explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
30.15k stars 4.4k forks source link

Getting KeyError: 'PUNCTSIDE_FIN' #4372

Closed AlonEirew closed 5 years ago

AlonEirew commented 5 years ago

How to reproduce the problem

Installation with: pip install -U spacy python -m spacy download en_core_web_sm

Error is thrown when running the spacy load command: spacy_parser = spacy.load('en_core_web_sm')

File "/Users/aeirew/workspace/cross-doc-coref/src/utils/string_utils.py", line 21, in StringUtils
    spacy_parser = spacy.load('en_core_web_sm')
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/__init__.py", line 27, in load
    return util.load_model(name, **overrides)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 134, in load_model
    return load_model_from_package(name, **overrides)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 155, in load_model_from_package
    return cls.load(**overrides)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/en_core_web_sm/__init__.py", line 12, in load
    return load_model_from_init_py(__file__, **overrides)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 196, in load_model_from_init_py
    return load_model_from_path(data_path, meta, **overrides)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 179, in load_model_from_path
    return nlp.from_disk(model_path)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/language.py", line 836, in from_disk
    util.from_disk(path, deserializers, exclude)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 636, in from_disk
    reader(path / key)
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/language.py", line 831, in <lambda>
    p, exclude=["vocab"]
  File "pipes.pyx", line 641, in spacy.pipeline.pipes.Tagger.from_disk
  File "/anaconda3/envs/cross-doc-coref/lib/python3.6/site-packages/spacy/util.py", line 636, in from_disk
    reader(path / key)
  File "pipes.pyx", line 629, in spacy.pipeline.pipes.Tagger.from_disk.load_tag_map
  File "morphology.pyx", line 56, in spacy.morphology.Morphology.__init__
  File "attrs.pyx", line 148, in spacy.attrs.intify_attrs
KeyError: 'PUNCTSIDE_FIN'

Your Environment

svlandeg commented 5 years ago

Hi @AlonEirew. Unfortunately I can't immediately reproduce your error.

A new version of spaCy has been released this week, so if you would run pip install -U spacy, it should install version 2.2.1. The model should be version 2.2.0 at this point.

Could you set up a new environment, run these commands again and check whether your error persists? If it does, could you paste here the output of the command python -m spacy validate ?

AlonEirew commented 5 years ago

Hi @svlandeg, Updating spacy solve the issue for me. Thank you!

svlandeg commented 5 years ago

Happy to hear it!

lock[bot] commented 5 years ago

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.