I am trying to run your example with streaming word vectors and I get the following error. How could this be fixed?
Thank you in advance!
Best,
Anastasia
from pymagnitude import * model = Magnitude("http://magnitude.plasticity.ai/fasttext/medium/crawl-300d-2M.magnitude", stream=True)
Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2900, in __init__ self.url = self.url[url_cis.index('http://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2909, in __init__ self.url = self.url[url_cis.index('https://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 3238, in xOpen self.basevfs, name, flags, self, self.options)) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2917, in __init__ raise RuntimeError("Invalid URL.") RuntimeError: Invalid URL. Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 359, in __init__ self.length = self._db().execute( File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 611, in _db self.path, check_same_thread=False) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 590, in sqlite3_connect return self.driver.Connection(*args, **kwargs) apsw.SQLError: SQLError: SQL logic error model = Magnitude('http://magnitude.plasticity.ai/word2vec/heavy/GoogleNews-vectors-negative300.magnitude', stream=True) Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2900, in __init__ self.url = self.url[url_cis.index('http://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2909, in __init__ self.url = self.url[url_cis.index('https://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 3238, in xOpen self.basevfs, name, flags, self, self.options)) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2917, in __init__ raise RuntimeError("Invalid URL.") RuntimeError: Invalid URL. Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 359, in __init__ self.length = self._db().execute( File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 611, in _db self.path, check_same_thread=False) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 590, in sqlite3_connect return self.driver.Connection(*args, **kwargs) apsw.SQLError: SQLError: SQL logic error
Hi,
I am trying to run your example with streaming word vectors and I get the following error. How could this be fixed?
Thank you in advance!
Best, Anastasia
from pymagnitude import * model = Magnitude("http://magnitude.plasticity.ai/fasttext/medium/crawl-300d-2M.magnitude", stream=True)
Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2900, in __init__ self.url = self.url[url_cis.index('http://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2909, in __init__ self.url = self.url[url_cis.index('https://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 3238, in xOpen self.basevfs, name, flags, self, self.options)) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2917, in __init__ raise RuntimeError("Invalid URL.") RuntimeError: Invalid URL. Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 359, in __init__ self.length = self._db().execute( File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 611, in _db self.path, check_same_thread=False) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 590, in sqlite3_connect return self.driver.Connection(*args, **kwargs) apsw.SQLError: SQLError: SQL logic error model = Magnitude('http://magnitude.plasticity.ai/word2vec/heavy/GoogleNews-vectors-negative300.magnitude', stream=True) Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2900, in __init__ self.url = self.url[url_cis.index('http://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2909, in __init__ self.url = self.url[url_cis.index('https://'):] ValueError: substring not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 3238, in xOpen self.basevfs, name, flags, self, self.options)) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 2917, in __init__ raise RuntimeError("Invalid URL.") RuntimeError: Invalid URL. Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 359, in __init__ self.length = self._db().execute( File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 611, in _db self.path, check_same_thread=False) File "C:\Users\annaz\PycharmProjects\newsalyze-backend\venv\lib\site-packages\pymagnitude\__init__.py", line 590, in sqlite3_connect return self.driver.Connection(*args, **kwargs) apsw.SQLError: SQLError: SQL logic error