Rasa shell not working properly

i was trying to test chatbot rasa by running this cmd: rasa run actions in an anaconda prompte, and rasa shell in a different anaconda prompte, the actions run juste fine , but once done it seems that the process ends, and the server does not keep running, like this:

2021-09-14 10:05:25 INFO rasa_sdk.executor - Registered function for ‘action_account_options’.

2021-09-14 10:05:25 INFO rasa_sdk.executor - Registered function for ‘action_account_balance’.

2021-09-14 10:05:25 INFO rasa_sdk.executor - Registered function for ‘action_account_details’.

(venv) C:\Users\fatima\test\rasabot>

And when i run rasa shell and start the conversation, it gives me this error: Failed to run custom action ‘action_menu’. Couldn’t connect to the server at 'http://localhost:5055/webhook’. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connect call failed (‘127.0.0.1’, 5055)] 2021-09-10 17:46:22 ERROR rasa.core.processor - Encountered an exception while running action ‘action_menu’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

@fatima1 please share the rasa --version

@fatima1 did you mentioned the all the actions in domain.yml ?

@fatima1 did you run the rasa action server in new terminal?

rasa version 1.3.1

yes all of actions are mentioned in domain.yml

yes i am using two different terminals

@fatima1 can you please update the rasa and rasa-sdk to 2.8.1?

pip install rasa==2.8.1

then share rasa --version to me please.

@fatima1 Can you share me the endpoints.yml file or please check this is uncommented

action_endpoint:
  url: "http://localhost:5055/webhook"

i am affraid this is not gonna be possible, because i am working on this project with a team who have been using this exacte version of rasa , so i must respect that. using this old version of rasa really made things hard for me ngl.

endpoint.yml

action_endpoint: url: “http://localhost:5055/webhook

@fatima1 Right, now worries in that case too, try remove that utterance and delete older model and retrain and try again and share me the feedback now.

@fatima1 Please mention this also in domain.yml action_menu

@fatima1 If you are allow to share some files then it will be great but if not we will solve it together.

i repeated the all process:

deleted old models

rasa train

rasa run actions -p 5055

rasa shell (in a different anaconda prompt)

Your input → 00

2021-09-14 10:45:40 ERROR rasa.core.actions.action - Failed to run custom action ‘action_menu’. Couldn’t connect to the server at ‘http://localhost:5055/webhook’. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connect call failed (‘127.0.0.1’, 5055)] 2021-09-14 10:45:40 ERROR rasa.core.processor - Encountered an exception while running action ‘action_menu’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

Your input →

action_menu is mentioned in domain.yml

i am not really allowed to share files but i can describe anything you ask me … also in my colleague’s machine this works just fine , but for me it does not, so i am pretty sure this problem is not about the project or its configuration but my machine and the different stuff i installed … idk

@fatima1 Do you have set of examples for the menu? can you please share the rasa shell --debug logs and action logs.

@fatima1 please check the action_menu file syntax and do mention action_menu in domain.yml

rasa shell --debug

(venv) C:\Users\fatima\test\rasabot>rasa shell --debug

2021-09-14 11:51:22 DEBUG rasa.model - Extracted model to ‘C:\Users\FATIMA\AppData\Local\Temp\tmp_hocdlp8’. 2021-09-14 11:51:22 DEBUG rasa.cli.utils - Parameter ‘endpoints’ not set. Using default location ‘endpoints.yml’ instead.

2021-09-14 11:51:22 DEBUG rasa.cli.utils - Parameter ‘credentials’ not set. Using default location ‘credentials.yml’ instead.

2021-09-14 11:51:22 DEBUG rasa.model - Extracted model to ‘C:\Users\FATIMA\AppData\Local\Temp\tmphomf2_fo’. 2021-09-14 11:51:31 INFO absl - Entry Point [tensor2tensor.envs.tic_tac_toe_env:TicTacToeEnv] registered with id [T2TEnv-TicTacToeEnv-v0]

2021-09-14 11:51:32 DEBUG sanic.root - CORS: Configuring CORS with resources: {’/’: {‘origins’: [’’], ‘methods’: ‘DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT’, ‘allow_headers’: [’.’], ‘expose_headers’: None, ‘supports_credentials’: False, ‘max_age’: None, ‘send_wildcard’: False, ‘automatic_options’: True, ‘vary_header’: True, ‘resources’: {’/*’: {‘origins’: ‘’}}, ‘intercept_exceptions’: True, ‘always_send’: True}}

2021-09-14 11:51:32 DEBUG rasa.core.utils - Available web server routes: /webhooks/rest GET custom_webhook_CmdlineInput.health /webhooks/rest/webhook POST custom_webhook_CmdlineInput.receive / GET hello

2021-09-14 11:51:32 INFO root - Starting Rasa server on http://localhost:5005

2021-09-14 11:51:32 INFO root - Enabling coroutine debugging. Loop id 2623413473416.

2021-09-14 11:51:32 DEBUG rasa.model - Extracted model to ‘C:\Users\FATIMA\AppData\Local\Temp\tmp3me2plgm’.

2021-09-14 11:51:39 INFO rasa.nlu.components - Added ‘SpacyNLP’ to component cache. Key ‘SpacyNLP-fr’.

2021-09-14 11:51:40 DEBUG rasa.core.tracker_store - Connected to InMemoryTrackerStore.

2021-09-14 11:51:40 DEBUG rasa.core.lock_store - Connected to lock store ‘InMemoryLockStore’.

2021-09-14 11:51:40 DEBUG rasa.model - Extracted model to ‘C:\Users\FATIMA\AppData\Local\Temp\tmprm7mhkq_’.

2021-09-14 11:51:40 DEBUG pykwalify.compat - Using yaml library: C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\ruamel\yaml_init_.py

2021-09-14 11:51:42 INFO rasa.core.policies.ensemble - MappingPolicy not included in policy ensemble. Default intents 'restart and back will not trigger actions ‘action_restart’ and ‘action_back’.

Bot loaded. Type a message and press enter (use ‘/stop’ to exit): Your input → 00

2021-09-14 11:51:48 DEBUG rasa.core.tracker_store - Creating a new tracker for id ‘default’.

2021-09-14 11:51:48 DEBUG rasa.core.processor - Received user message ‘00’ with intent ‘{‘name’: ‘menu’, ‘confidence’: 1.0}’ and entities ‘[]’

2021-09-14 11:51:48 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 2 events

2021-09-14 11:51:49 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {‘intent_menu’: 1.0, ‘prev_action_listen’: 1.0}] 2021-09-14 11:51:49 DEBUG rasa.core.policies.memoization - There is a memorised next action ‘35’

2021-09-14 11:51:49 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).

2021-09-14 11:51:49 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_1_AugmentedMemoizationPolicy 2021-09-14 11:51:49 DEBUG rasa.core.processor - Predicted next action ‘action_menu’ with confidence 1.00.

2021-09-14 11:51:49 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action_menu’.

2021-09-14 11:51:53 ERROR rasa.core.actions.action - Failed to run custom action ‘action_menu’. Couldn’t connect to the server at ‘http://localhost:5055/webhook’. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connect call failed (‘127.0.0.1’, 5055)]

2021-09-14 11:51:53 ERROR rasa.core.processor - Encountered an exception while running action ‘action_menu’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

2021-09-14 11:51:53 DEBUG rasa.core.processor - Failed to execute custom action. Traceback (most recent call last): File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 969, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File “C:\Users\fatima\Anaconda3\envs\venv\lib\asyncio\base_events.py”, line 958, in create_connection raise exceptions[0] File “C:\Users\fatima\Anaconda3\envs\venv\lib\asyncio\base_events.py”, line 945, in create_connection await self.sock_connect(sock, address) File “C:\Users\fatima\Anaconda3\envs\venv\lib\asyncio\selector_events.py”, line 473, in sock_connect return await fut File “C:\Users\fatima\Anaconda3\envs\venv\lib\asyncio\selector_events.py”, line 503, in _sock_connect_cb raise OSError(err, f’Connect call failed {address}’) ConnectionRefusedError: [Errno 10061] Connect call failed (‘127.0.0.1’, 5055)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\rasa\core\actions\action.py”, line 457, in run json=json_body, method=“post”, timeout=DEFAULT_REQUEST_TIMEOUT File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\rasa\utils\endpoints.py”, line 144, in request **kwargs File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\client.py”, line 1117, in aenter self._resp = await self._coro File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\client.py”, line 521, in _request req, traces=traces, timeout=real_timeout File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 535, in connect proto = await self._create_connection(req, traces, timeout) File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 892, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 1051, in _create_direct_connection raise last_exc File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 1032, in _create_direct_connection client_error=client_error, File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\aiohttp\connector.py”, line 975, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:5055 ssl:default [Connect call failed (‘127.0.0.1’, 5055)]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\rasa\core\processor.py”, line 468, in _run_action events = await action.run(output_channel, nlg, tracker, self.domain) File “C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\rasa\core\actions\action.py”, line 487, in run raise Exception(“Failed to execute custom action.”) Exception: Failed to execute custom action.

2021-09-14 11:51:53 DEBUG rasa.core.processor - Action ‘action_menu’ ended with events ‘[]’

2021-09-14 11:51:53 DEBUG rasa.core.processor - Current slot values:

    index: None
    suggestion_en_1: None
    suggestion_en_2: None
    suggestion_en_3: None
    suggestion_en_4: None
    suggestion_fr_1: None
    suggestion_fr_2: None
    suggestion_fr_3: None
    suggestion_fr_4: None

2021-09-14 11:51:53 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, {}, {‘intent_menu’: 1.0, ‘prev_action_listen’: 1.0}, {‘intent_menu’: 1.0, ‘prev_action_menu’: 1.0}]

2021-09-14 11:51:53 DEBUG rasa.core.policies.memoization - There is a memorised next action ‘0’

2021-09-14 11:51:53 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).

2021-09-14 11:51:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_1_AugmentedMemoizationPolicy

2021-09-14 11:51:53 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00.

2021-09-14 11:51:53 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘[]’

2021-09-14 11:51:53 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘default’.

Your input →

rasa run actions -p 5055 --debug

(venv) C:\Users\fatima\test\rasabot>rasa run actions -p 5055 --debug C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) C:\Users\fatima\Anaconda3\envs\venv\lib\importlib_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject return f(*args, **kwds) 2021-09-14 12:11:26 INFO rasa_sdk.endpoint - Starting action endpoint server… C:\Users\fatima\Anaconda3\envs\venv\lib\site-packages\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning warnings.warn(‘Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning’)

2021-09-14 12:11:27 INFO rasa_sdk.executor - Registered function for ‘action_menu’.

2021-09-14 12:11:27 INFO rasa_sdk.executor - Registered function for ‘action_account_options’. 2021-09-14 12:11:27 INFO rasa_sdk.executor - Registered function for ‘action_account_balance’. 2021-09-14 12:11:27 INFO rasa_sdk.executor - Registered function for ‘action_account_details’.

(venv) C:\Users\fatima\test\rasabot>

action_menu is mentioned in domain.yml

there is many other actions there, but i only showed few, as exemples

@fatima1 you can share credentials.yml file for me?

@fatima1 On your ven environment please type rasa --version and share with me screenshot

cridentials.yml

rest:

rasa:

url: "http://action-server:5002/api"

rasa version Capture d’écran 2021-09-14 141645

@fatima1 means you don’t have rasa core and Rasa NLU or rasa -sdk?

@fatima1 only you are seeing rasa version 1.3.1 yes or no?

@fatima1 Please share config.yml also

yes this is everything it gave me

@fatima1 you need to install

pip install rasa-sdk==1.3.3

Please share again rasa --version

Please note: I am suggesting this version based on this Compatibility Matrix

Urgent Note: I’d strongly recommend to create the requirement file for your current environment

pip freeze > requirements.txt This will save all your libraries and packages for your current environment in case if you encountered any issue.

pip install rasa-sdk==1.3.3

Please share again rasa --version

loop

it does not give extra informations litterally only the version

@fatima1 Can you asked your colleague to create the pip freeze > requirement.txt file for the running environment which they are using?

@fatima1 Can you check pip list and check what is displayed by the name of rasa ; please share those version for me.

requirement.txt already exist here

requests==2.22.0

boto3==1.9.146

matplotlib==3.0.3

simplejson==3.16.0

attrs==19.1.0

jsonpickle==1.1

redis==3.3.5

fakeredis==1.0.3

pymongo==3.8.0

numpy==1.16.3

scipy==1.2.1

tensorflow==1.14.0

apscheduler==3.6.0

tqdm==4.31.0

networkx==2.3

pykwalify==1.7.0

coloredlogs==10.0

ruamel.yaml==0.15.94

scikit-learn==0.20.2

slackclient==1.3.1

webexteamssdk==1.1.1

mattermostwrapper==2.1

colorhash==1.0.2

pika==1.0.1

jsonschema==2.6.0

packaging==19.0

gevent==1.4.0

pytz==2019.1

python-dateutil==2.8.0

rasa==1.3.1

rasa-sdk~=1.3.0

colorclass==2.2.0

terminaltables==3.1.0

sanic==19.3.1

sanic-cors==0.9.8

sanic-jwt==1.3.1

aiohttp==3.5.4

questionary==1.1.1

python-socketio==4.3.1

pydot==1.4.1

async_generator==1.10

SQLAlchemy~=1.3.3

kafka-python==1.4.6

sklearn-crfsuite==0.3.6

psycopg2-binary==2.8.2

twilio~=6.0

gast==0.2.2

spacy==2.1.4

jieba==0.39

pandas==0.25.2

fuzzywuzzy==0.17.0

cloudpickle==1.2.0

tensor2tensor==1.14.1

tensorboard==1.14.0

tensorflow-datasets==1.2.0

tensorflow-estimator==1.14.0

tensorflow-gan==1.0.0.dev0

tensorflow-metadata==0.14.0

tensorflow-probability==0.7.0

python-Levenshtein==0.12.0

**as for pip install **

rasa 1.3.1

rasa-sdk 1.3.3

rsa 4.0

@fatima1 I think older version required Rasa NLU and rasa core, as your version is quite old :frowning:

Try install:

pip install rasa-nlu and rasa-core

Note from the error: There is no rasa core in your pip list: ERROR rasa.core.processor

@fatima1 Even please check the rasa documentation of version 1.X : https://legacy-docs-v1.rasa.com

Gotcha for you is that, you need to check the syntax, packages and libraries used for actions and for .md files because now all the files are migrated to .yml

So, basically you need to check the syntax and everything based on 1.x rather than 2.0.

I hope my suggestion and points are clear to you?

@fatima1 Even, I strongly suggest to you and your team to migrate to rasa latest version 2.8.1 at least