Hi.
I'm trying to get started with spacy and I get this issue when running simple code:
import spacy
spacy.prefer_gpu()
nlp = spacy.load('en_core_web_sm')
Traceback (most recent call last):
File "
File "/usr/local/lib/python3.6/dist-packages/spacy/__init__.py", line 21, in load
return util.load_model(name, overrides)
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 114, in load_model
return load_model_from_package(name, *overrides)
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 135, in load_model_from_package
return cls.load(overrides)
File "/usr/local/lib/python3.6/dist-packages/en_core_web_sm/__init__.py", line 12, in load
return load_model_from_init_py(__file__, *overrides)
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 173, in load_model_from_init_py
return load_model_from_path(data_path, meta, *overrides)
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 156, in load_model_from_path
return nlp.from_disk(model_path)
File "/usr/local/lib/python3.6/dist-packages/spacy/language.py", line 647, in from_disk
util.from_disk(path, deserializers, exclude)
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 511, in from_disk
reader(path / key)
File "/usr/local/lib/python3.6/dist-packages/spacy/language.py", line 643, in
deserializers[name] = lambda p, proc=proc: proc.from_disk(p, vocab=False)
File "pipeline.pyx", line 643, in spacy.pipeline.Tagger.from_disk
File "/usr/local/lib/python3.6/dist-packages/spacy/util.py", line 511, in from_disk
reader(path / key)
File "pipeline.pyx", line 626, in spacy.pipeline.Tagger.from_disk.load_model
File "pipeline.pyx", line 627, in spacy.pipeline.Tagger.from_disk.load_model
File "/usr/local/lib/python3.6/dist-packages/thinc/neural/_classes/model.py", line 335, in from_bytes
data = msgpack.loads(bytes_data, encoding='utf8')
File "/usr/local/lib/python3.6/dist-packages/msgpack_numpy.py", line 184, in unpackb
return _unpackb(packed, *
File "msgpack/_unpacker.pyx", line 187, in msgpack._cmsgpack.unpackb
ValueError: 1792000 exceeds max_bin_len(1048576)
```
My server is powerful 16GB and 6CPU, what can be the issue ?
I am getting the same issue. It was working fine before today.
Looks like this is related to today's update of msgpack 馃槥 Working on this, see my comment in #2995:
Looks like it might be related to an update of the
msgpacklibrary that was released today and is used in our librarythinc, which spaCy depends on. So when you installed spaCy, that new version was pulled in and apparently it includes a change to the limit?We'll investigate this and hopefully push an update to thinc soon. In the meantime, try downgrading
msgpack:pip install msgpack==0.5.6
I've started experiencing this today as well, whever loading the en_core_web_sm model either with:
import en_core_web_sm
nlp = en_core_web_sm.load()
or having downloaded the model with spacy download
import spacy
nlp = spacy.load('en_core_web_sm')
Interestingly when i run python -m spacy info --markdown it returns: **Models:** en_core_web_lg, despite having loaded en_core_web_sm.
Getting the same kind of issue with msgpack 0.5.6:
File "msgpack/_unpacker.pyx", line 200, in msgpack._unpacker.unpackb
ValueError: 2681947787 exceeds max_bin_len(2147483647)
I am getting the same error when I am trying to run:
nlp = spacy.load('en_core_web_sm')
I am getting:
ValueError: 1792000 exceeds max_bin_len(1048576)
Same issue...
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
Looks like this is related to today's update of
msgpack馃槥 Working on this, see my comment in #2995: