Error when running custom action: "ModuleNotFoundError: No module named 'rasa_sdk'"

@mx06148391 Ok. Sorted,

Step 1: Create a new environment, and install rasa 3.0.5 using the command: pip install rasa==3.0.5

Step 2: Check rasa --version

Step 3: It will show you "ImportError: cannot import name ‘CompositionView’ from ‘sanic.views’ error

Install pip install sanic==21.9.3 --use-feature=2020-resolver

Step 4: Check rasa --version

Step 5: install rasa init

Step 6: Run 'rasa run actions`

Note:

In VS code Problems (2) it will still show the issue of rasa_sdk but it will run the actions

everything worked fine when I started all over using Anaconda. thank you for your help.

@mx06148391 Finally!! Please close this thread as the solution and good luck!

Hello, @nik202. I am getting this exact same error. I have tried doing the solution, but It doesn’t work.

image

@modesty install the latest rasa and check the rasa documentation as per your requirements.

hey @nik202 I am working on a chatbot where that provides customers information about products/events, the comapnies database in on mysql, so I was using mysqlconnector to connect it to the database and then using action.py to execute queries based on the most probable intent, the problem is though I had installed all the dependencies according to the guide I am getting modulenotfound errors and wrong version errors

If you can recommend me versions or anything really.

Capture3

so when I change the version of protobuf to 4.23.3 SQLconnector has a problem because it needs 4.21.1 to work, and if I change it to 4.21.1 rasa has a problem because it needs 4.23.3

These are the current versions I have image image image

Is this still the issue at your end?

No, I figured it out it was some version issue when I was working with Conda. I started using Venv, and now there is no issue.