Cannot import create_connection form websocket Rasa Core Agent

Hi

I’m getting this error again and again and I can’t figure out if its the version of Rasa Core or any other problem. Please let me know if anyone has a solution.

Error:

Traceback (most recent call last): File “C:/Users/qasim/PycharmProjects/healthbot/run.py”, line 1, in from rasa_core.agent import Agent File “C:\Users\qasim\Anaconda3\lib\site-packages\rasa_core\agent.py”, line 24, in from rasa_core.channels import UserMessage, OutputChannel, InputChannel File “C:\Users\qasim\Anaconda3\lib\site-packages\rasa_core\channels_init_.py”, line 27, in from rasa_core.channels.slack import SlackInput # nopep8 File “C:\Users\qasim\Anaconda3\lib\site-packages\rasa_core\channels\slack.py”, line 11, in from slackclient import SlackClient File “C:\Users\qasim\Anaconda3\lib\site-packages\slackclient_init_.py”, line 1, in from .client import SlackClient # noqa File “C:\Users\qasim\Anaconda3\lib\site-packages\slackclient\client.py”, line 7, in from .server import Server File “C:\Users\qasim\Anaconda3\lib\site-packages\slackclient\server.py”, line 14, in from websocket import create_connection ImportError: cannot import name ‘create_connection’

Rasa Core Version: 0.11.0 Rasa-Core-SDK Version: 0.12.2 Rasa-NLU Version: 0.13.0

Hi there @digitaShadow, the biggest possibility is that it’s probably importing either the wrong version of slackclient, or a version that is unsupported on e.g. the python version you are using. However, it’s hard to say because the versions you are using are very old – a lot has changed and also been fixed since those versions (I have been working at Rasa for almost a year and haven’t worked with core 0.11.0 for example :smiley:) I would recommend migrating your bot to the newer rasa versions in order to be able to get proper support for bugs from not only Rasas but also the community members.

I’m using Python 3.5 but I also think that I should upgrade it to Rasa X.

Thanks for your response.

Agreed, you should update :grinning_face_with_smiling_eyes:just know that the newer versions of rasa run on python 3.6 or later, so you will probably need to create a new virtual environment with a higher version of python.