Profanity_filter: Couldn't load Spacy model for any of languages: en

I installed spaCy = 2.1 and en language and linked it.

I add the Profanity analyzer file.

then, I run “rasa shell” but it can’t load the spacy model for the language and I received this error when I typed any message:

Are you able to load the en spacy model in a python interpreter in the same environment, or does it also give you an error? It could just not be linked the way you think.

I can’t understand what you talking about. but, I already download the en and link it via spacy version = 2.1 And, I have the same error in another project. after, I download en and link it. It gives me an error for download spacy and links it again

You can test it by starting the python interpreter in the same virtual environment where you have Rasa installed, and then trying the following:

$ python
>>> import spacy
>>> spacy.load("en", disable=["parser"])


if this also gives you an error, then your model is not linked by the name en.

What command are you running to download and link the model?

I received this error

In the future, feel free to post the actual text into the channel instead of the screenshots. That way we can more easily copy/paste the code and help you debug. If you want to share code you can use the markdown syntax to give the code proper highlighting too. You can read more about that syntax here.

1 Like

can you load en_core_web_md by that name?

yes, i can load and link en_core_web_md but when i user “rasa shell” command. After type any text, It gives me and error that can’t find model ‘en’ and ask me to load en_core_web_md and link it.

I suspect you are not in the same environment where you downloaded the model. What is the output of each of these commands?

which python
python -c "import sys; print(sys.executable)"
which rasa
python -c "import rasa; print(rasa.__path__)"

I received this output

(lazioenv) C:\Users\aahla\Desktop\lazio>python -c “import sys; print(sys.executable)” C:\Users\aahla\anaconda3\envs\lazioenv\python.exe

(lazioenv) C:\Users\aahla\Desktop\lazio>python -c “import rasa; print(rasa.path)” 2021-03-12 18:49:59.939459: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll [‘C:\Users\aahla\anaconda3\envs\lazioenv\lib\site-packages\rasa’]

and for which rasa and which python?

It received me that the “which” is not recognized

‘which’ is not recognized as an internal or external command, operable program or batch file.

Use where instead of which