“ImportError: cannot import name ‘SupportsIndex’” error observed when using the command “rasa x” to launch the local host. Can someone help me with the issue?
What’s the output of rasa --version
?
Rasa Version : 2.8.4 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : 0.42.1 Python Version : 3.6.10
Rasa Version : 2.8.4 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : 0.42.1 Python Version : 3.6.10
(CHATBOT) shine@shine-HP-Pavilion-15-Notebook-PC:~/Projects/RASA$ rasa x /home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn’t match a supported version! RequestsDependencyWarning) /home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn’t match a supported version! RequestsDependencyWarning) Traceback (most recent call last): File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasa/cli/x.py”, line 502, in run_locally domain_path=domain_path, File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/local.py”, line 209, in main global_state.initialize_global_state(NUMBER_OF_SANIC_WORKERS, is_local_mode=True) File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/global_state.py”, line 64, in initialize_global_state from rasax.community.services.integrated_version_control import git_service File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/services/integrated_version_control/git_service.py”, line 25, in from git import Repo, Reference, PushInfo, RemoteReference, Actor File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/init.py”, line 8, in from git.exc import * # @NoMove @IgnorePep8 File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/exc.py”, line 10, in from git.compat import safe_decode File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/compat.py”, line 32, in from git.types import TBD File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/types.py”, line 12, in from typing_extensions import Final, Literal, SupportsIndex # noqa: F401 ImportError: cannot import name ‘SupportsIndex’
Follow these steps as error come.
Downgrade to this version
pip install rasa-x==0.39.3 --extra-index-url https://pypi.rasa.com/simple
check rasa version rasa --version
its install or not
You will see some error : ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ Install
pip install SQLAlchemy==1.3.22
should fix it
If sanic related error:
pip install sanic-jwt==1.6.0
delete .db if is showing alembic issue.
Good luck! I hope this will solve your issue.
Thanks for the reply. The provided resolution did not work and I am getting the same issue again.
(CHATBOT) shine@shine-HP-Pavilion-15-Notebook-PC:~/Projects/RASA$ rasa x Traceback (most recent call last): File “/home/shine/anaconda5/envs/CHATBOT/bin/rasa”, line 8, in sys.exit(main()) File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasa/main.py”, line 117, in main cmdline_arguments.func(cmdline_arguments) File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasa/cli/x.py”, line 354, in rasa_x run_locally(args) File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasa/cli/x.py”, line 469, in run_locally from rasax.community import local File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/local.py”, line 22, in import rasax.community.server as rasa_x_server File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/server.py”, line 6, in from rasax.community.services.integrated_version_control import git_service File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/rasax/community/services/integrated_version_control/git_service.py”, line 25, in from git import Repo, Reference, PushInfo, RemoteReference, Actor File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/init.py”, line 8, in from git.exc import * # @NoMove @IgnorePep8 File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/exc.py”, line 10, in from git.compat import safe_decode File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/compat.py”, line 32, in from git.types import TBD File “/home/shine/anaconda5/envs/CHATBOT/lib/python3.6/site-packages/git/types.py”, line 12, in from typing_extensions import Final, Literal, SupportsIndex # noqa: F401 ImportError: cannot import name ‘SupportsIndex’
Rasa Version : 2.8.4 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : 0.39.3 Python Version : 3.6.10
@shinek333 are you able to run only rasa open source whilst using rasa shell --debug can you confirm me, please?
Hi Nik,
Upon running the shell i am getting the following error,
The path ‘models’ does not exist. Please make sure to use the default location (‘models’) or specify it with ‘–model’.
@shinek333 Are you able to run rasa shell --debug or rasa x execution commands ?
@shinek333 Can you activate environment and type rasa --version and share the screenshot please.
I got he error given in the previous post after running shell --debug. rasa x is still throwing the same error given in the first post.
rasa version
Rasa Version : 2.8.4 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.2 Rasa X Version : 0.39.3 Python Version : 3.6.10
@shinek333 can I request you to please follow this fresh approach.
I’d recommend to create a fresh conda environment with python 3.8 and follow the step
`pip install rasa==2.8.1`
`pip install rasa-sdk==2.8.1'
check version rasa --version
its install or not
then
pip install rasa-x==0.39.3 --extra-index-url https://pypi.rasa.com/simple
check rasa version rasa --version
its install or not
You will see some error : ImportError: cannot import name ‘RowProxy’ from ‘sqlalchemy.engine’ Install
pip install SQLAlchemy==1.3.22
should fix it
If sanic related error:
pip install sanic-jwt==1.6.0
delete .db if is showing alembic issue.
Note: I hope you have install Anaconda 3.6+ in your local machine and should create the conda environment Good luck! I hope this will solve your issue.
Hi Nik,
It worked and now I am able to launch rasa x.
Thank you for your support.
@shinek333 Great, can you please close this thread with the solution for others. Thanks.
Valuable links and resources for your reference
- RasaMasterclass
- Conversational AI with Rasa
- Rasa for Beginners
- Rasa Certification Workshop
- Rasa Advanced Custom Actions, Forms, & Responses Workshop
- Rasa Advanced Deployment Workshop
- Rasa Youtube Channel Please subscribe and hit the bell icon for notification.
- Rasa Github Mini Project
I hope these links will help you to learn Rasa!