ModuleNotFoundError: No module named 'rasa.graph_components.providers.domain_without_response_provider'

I removed my venv folder and reinstalles rasa pip3 install rasa. Now, I am trying to run rasa shell or rasa shell nlu and I see the following error:

Traceback (most recent call last):
  File "/home/charles/Documents/DU/chatbot/mbaza/venv/lib/python3.7/site-packages/rasa/engine/graph.py", line 109, in from_dict
    serialized_node["uses"]
  File "/home/charles/Documents/DU/chatbot/mbaza/venv/lib/python3.7/site-packages/rasa/shared/utils/common.py", line 36, in class_from_module_path
    m = importlib.import_module(module_name)
  File "/home/charles/anaconda3/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'rasa.graph_components.providers.domain_without_response_provider'

I notice this requested file is in the old venv folder but not in the new one. I created a fresh rasa project and I don’t get this error. Why is my project still requiring this file?

What’s going on?

If it’s the same version, you can copy the whole lib folder between virtual environments

Thanks. While I agree that could be a work around, I don’t know why it would work on a fresh project with rasa init but not with an existing project.

That being said, what lib folder (in which venv) do I copy to what (venv)?

1 Like

@laboratory confirm with us, the existing project’s previous rasa version? and what is the new rasa version?

@nik202 They are both 3.0. I already have the existing project upgraded to 3.0. I basically deleted my venv folder (because I wanted to have the venv folder within my project) and I did pip3 install rasa.

The difference between both project is that the other one is a fresh project using rasa init.

I did that to test where the problem could be coming from. I see the rasa init project also doesn’t have the rasa.graph_components.providers.domain_without_response_provider like mine but I don’t get the error in the rasa init project

@laboratory quite strange issue, can you please follow these steps:

For installing Rasa 3.x with the Rasa 3.x code (only)

  1. Create the project folder or existing project based on Rasa 3.x
  2. Create the fresh conda based environment for python 3.7 or 3.8 or venv folder inside the folder
  3. Install rasa using the command pip install rasa or pip install rasa[full] Note: you should met all the compatibilties issue if encourntered else it will cause errors later.
  4. Check rasa is install or not using command : rasa --version
  5. Train the model based on latest installation rasa train --debug
  6. run the rasa server using the command: rasa run shell --debug
  7. If you have rasa action server open in new terminal and run rasa run actions --debug

If rasa any point through error realted graph please share the error screenshot with me.

@laboratory confirm with me two things how you are running the rasa opensource (command) or are you using any front end to see the bot?

Sorry for late reply, please update me how you proceed. Thanks

Copy the old venv’d lib folder in the new venv

Thanks all. I was able to get it working. The things I did differently was training a new model using rasa train as pointed by @nik202 and also installed spacy (which I forgot to) in my venv.

I don’t know what exactly solved it.

Anyways, many thanks to you both

@laboratory congrst Yusuf, please close this thread as solution for other. Thou I am confused with the solution as it’s relate to environment but anyways its good for you able to solve it. Good Luck with your project.

1 Like