/restart or action_restart works in interactive mode but not in shell mode RASA

Hi All,

I am trying to implement the default action: /restart or action_restart. I have action_restart added under actions in domain.yml and Mapping policy is also enabled.

When I am trying to test this feature in interactive mode: rasa interactive, it’s working fine.

? Your input -> /restart 2019-09-11 10:44:41 INFO rasa.core.training.interactive - Restarted conversation, starting a new one.

But the same feature when executed via command line (rasa shell) is throwing an error: Your input -> hi Hey! How are you? Your input -> /restart 2019-09-11 10:46:31 ERROR rasa.core.processor - Encountered an exception while running action ‘action_restart’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

Upon checking action server logs, I see below error: File “/apps/scripts/Python3_Projects/lib/python3.6/site-packages/rasa_sdk/executor.py”, line 246, in run “No registered Action found for name ‘{}’.”.format(action_name) Exception: No registered Action found for name ‘action_restart’.

Also debug log errors below (rasa shell --debug):

2019-09-11 11:02:31 DEBUG rasa.core.policies.mapping_policy - The predicted intent ‘restart’ is mapped to action ‘action_restart’ in the domain. 2019-09-11 11:02:31 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_MappingPolicy 2019-09-11 11:02:31 DEBUG rasa.core.processor - Predicted next action ‘action_restart’ with confidence 1.00. 2019-09-11 11:02:31 DEBUG rasa.core.actions.action - Calling action endpoint to run action ‘action_restart’. 2019-09-11 11:02:31 ERROR rasa.core.processor - Encountered an exception while running action ‘action_restart’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information. 2019-09-11 11:02:31 DEBUG rasa.core.processor - Failed to execute custom action. Traceback (most recent call last): File “/apps/scripts/Python3_Projects/lib/python3.6/site-packages/rasa/core/actions/action.py”, line 457, in run json=json_body, method=“post”, timeout=DEFAULT_REQUEST_TIMEOUT File “/tmp/PythonNew/lib/python3.6/asyncio/coroutines.py”, line 110, in next return self.gen.send(None) File “/apps/scripts/Python3_Projects/lib/python3.6/site-packages/rasa/utils/endpoints.py”, line 148, in request resp.status, resp.reason, await resp.content.read() rasa.utils.endpoints.ClientResponseError: 500, INTERNAL SERVER ERROR, body=‘b’\n500 Internal Server Error\n

Internal Server Error

\n

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

\n’’

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

Traceback (most recent call last): File “/apps/scripts/Python3_Projects/lib/python3.6/site-packages/rasa/core/processor.py”, line 468, in _run_action events = await action.run(output_channel, nlg, tracker, self.domain) File “/tmp/PythonNew/lib/python3.6/asyncio/coroutines.py”, line 110, in next return self.gen.send(None) File “/apps/scripts/Python3_Projects/lib/python3.6/site-packages/rasa/core/actions/action.py”, line 479, in run raise Exception(“Failed to execute custom action.”) from e Exception: Failed to execute custom action.

Note: I have tested this using a new/blank project created using rasa init and uncommented/added necessary code to run a preliminary test. I am using Rasa 1.3.2 on top of Python 3.6 for Linux.

If anyone else has faced this issue or has any workaround, kindly share.

Thanks!!!

Which Rasa Version ist this on?

Thank you @erohmensing for your response. I am using Rasa 1.3.2 on top of Python 3.6 for Linux.

Ah wait, I think I know what’s going on. action_restart is a default action, which means you shouldn’t define it in your domain.yml – If you define it, you’re essentially saying that you have overwritten that action, and it looks to your custom action server for an implementation. Can you remove it from your domain and try again?

2 Likes

Thank you, this was really helpful. Looking forward to further engagements and contributions to this community. Cheers!! -Arunabh

1 Like

One could use an http-api while creating a new event – restart-- with the help of a post request on RASA server: http://localhost:5605/conversations/{sender_id}/tracker/events and payload as: [

{

“event”: “restart”,

“timestamp”: 1559744410

}

] This would restart the session while deleting every event stored in In-Memory tracker store