After installing Spacy I run the following command
python -m spacy.en.download
and got the error:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/spacy/en/download.py", line 13, in <module>
plac.call(main)
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/spacy/en/download.py", line 9, in main
download('en', force)
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/spacy/download.py", line 24, in download
package = sputnik.install(about.__title__, about.__version__, about.__models__[lang])
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/sputnik/__init__.py", line 37, in install
index.update()
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/sputnik/index.py", line 84, in update
index = json.load(session.open(request, 'utf8'))
File "/Users/andrazhribernik/cytora/streaming-pipeline/venv/lib/python2.7/site-packages/sputnik/session.py", line 43, in open
r = self.opener.open(request)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
It seems that server where models are stored is down. It could be that I am missing something. Thanks for your help.
+1, having the same issue.
Thanks for the report — this is probably related to the hand-over described here: https://www.spacy.io/blog/announcement
Will have more info for you over the next 12 hours.
@honnibal is there any easy workaround to load a model from a local file?
import spacy.en
nlp = English(data_dir='/path/to/model')
@honnibal when I try your work around to access the English model i get the following error:
IOError Traceback (most recent call last)
1 import spacy.en
----> 2 nlp = English(data_dir='/path/to/model')
/Users/ankitpatel/anaconda/lib/python2.7/site-packages/spacy/language.pyc in init(self, data_dir, vocab, tokenizer, tagger, parser, entity, matcher, serializer, load_vectors, package, vectors_package)
176
177 if vocab in (None, True):
--> 178 vocab = self.default_vocab(package, vectors_package=vectors_package)
179 self.vocab = vocab
180 if tokenizer in (None, True):
/Users/ankitpatel/anaconda/lib/python2.7/site-packages/spacy/language.pyc in default_vocab(cls, package, get_lex_attr, vectors_package)
110 if hasattr(package, 'dir_path'):
111 return Vocab.from_package(package, get_lex_attr=get_lex_attr,
--> 112 vectors_package=vectors_package)
113 else:
114 return Vocab.load(package, get_lex_attr)
/Users/ankitpatel/anaconda/lib/python2.7/site-packages/spacy/vocab.pyx in spacy.vocab.Vocab.from_package (spacy/vocab.cpp:3584)()
62 lemmatizer=lemmatizer, serializer_freqs=serializer_freqs)
63
---> 64 with package.open(('vocab', 'strings.json')) as file_:
65 self.strings.load(file_)
66 self.load_lexemes(package.file_path('vocab', 'lexemes.bin'))
/Users/ankitpatel/anaconda/lib/python2.7/contextlib.pyc in enter(self)
15 def enter(self):
16 try:
---> 17 return self.gen.next()
18 except StopIteration:
19 raise RuntimeError("generator didn't yield")
/Users/ankitpatel/anaconda/lib/python2.7/site-packages/sputnik/package_stub.pyc in open(self, path_parts, mode, encoding, default)
65 else:
66 if isinstance(default, type) and issubclass(default, Exception):
---> 67 raise default(self.file_path(*path_parts))
68 elif isinstance(default, Exception):
69 raise default
IOError: /path/to/model/vocab/strings.json'''
This should be fixed now.
When I moved the website, I forgot to add a CNAME record for index.spacy.io, which serves the data packages.
I'm having this issue now, and index.spacy.io cannot be found either.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I'm having this issue now, and index.spacy.io cannot be found either.