deepklarity / jupyter-text2code

A proof-of-concept jupyter extension which converts english queries into relevant python code
MIT License
2.1k stars 360 forks source link

Getting below error while running Jupiter-notebok after pip installing text2code #16

Closed varunmittal50 closed 4 years ago

varunmittal50 commented 4 years ago

[W 14:18:03.862 NotebookApp] Error loading server extension mopp.mopp_serverextension Traceback (most recent call last): File "/Users/varun/venv/ml/lib/python3.7/site-packages/notebook/notebookapp.py", line 1942, in init_server_extensions mod = importlib.import_module(modulename) File "/Users/varun/venv/ml/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/init.py", line 487, in CG = CodeGenerator() File "/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/init.py", line 48, in init self.nlp = spacy.load(SPACY_MODEL_DIR) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/init.py", line 30, in load return util.load_model(name, overrides) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 166, in load_model return load_model_from_path(Path(name), overrides) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 211, in load_model_from_path return nlp.from_disk(model_path, exclude=disable) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/language.py", line 947, in from_disk util.from_disk(path, deserializers, exclude) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 654, in from_disk reader(path / key) File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/language.py", line 931, in p File "vocab.pyx", line 466, in spacy.vocab.Vocab.from_disk File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1203, in open opener=self._opener) File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1058, in _opener return self._accessor.open(self, flags, mode) FileNotFoundError: [Errno 2] No such file or directory: '/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/models/ner/vocab/lexemes.bin'

dk-dsr commented 4 years ago

This error is thrown due to incompatible spacy version. We have pinned the correct version now. Please uninstall the plugin by running: pip uninstall mopp Then take latest pull and follow the installation instructions from readme.