UCREL / pymusas

Python Multilingual Ucrel Semantic Analysis System
https://ucrel.github.io/pymusas/
Apache License 2.0
30 stars 12 forks source link

load_model_from_init_py() got an unexpected keyword argument 'enable' #34

Closed FahdCodes closed 2 years ago

FahdCodes commented 2 years ago

I'm using the English tagger. If I run the same code as mentioned in https://ucrel.github.io/pymusas/usage/how_to/tag_text, it is throwing up an error. The error happens in the following line of the code:

english_tagger_pipeline = spacy.load('en_dual_none_contextual')

The error is: `/usr/local/lib/python3.7/dist-packages/en_dual_none_contextual/init.py in load(overrides) 44 45 def load(overrides): ---> 46 return load_model_from_init_py(file, **overrides)

TypeError: load_model_from_init_py() got an unexpected keyword argument 'enable'`

It was working perfectly fine 2 days ago. This error seems to be recent.

matthewcoole commented 2 years ago

Thanks for reporting @FahdCodes,

The error seems to be coming from a new argument added to the latest version of spacy which we haven't tested with yet.

A workaround for now is to downgrade to v3.3.1 of spacy.

pip uninstall spacy
pip install spacy==3.3.1

Hope this helps.

FahdCodes commented 2 years ago

Thanks! that worked perfectly

perayson commented 2 years ago

Thanks @matthewcoole! Glad that this worked okay. I'm closing this issue now, but we'll return to it once we have the new pot of funding started and someone will be working on pymusas again more regularly.