Raise RasaException("Failed to execute custom action.")

Hi All,

Would like to request a help for this error: raise RasaException(“Failed to execute custom action.”)

These are the following things I have done to the original Rasa files:

  1. Edited nlu.yml
  2. Edited stories.yml
  3. Edited domain.yml
  4. Re-train rasa model by running “rasa train”
  5. Run the rasa server by running “rasa run actions”
  6. Start the chartbot by running “rasa shell”

There is nothing wrong from step 1 to 6, until when I key in my input using the intent I have put into nlu.yml, the response it the following error:

Traceback (most recent call last): File “c:\users\65867\desktop\rasa\venv\lib\site-packages\rasa\core\processor.py”, line 772, in _run_action events = await action.run( File “c:\users\65867\desktop\rasa\venv\lib\site-packages\rasa\core\actions\action.py”, line 709, in run raise RasaException(“Failed to execute custom action.”) from e rasa.shared.exceptions.RasaException: Failed to execute custom action.

Hope anyone can help.

Thank you.

@cleong008 Did you mention action in actions in domain.yml? can you share the screenshot of this error?

Hi Nik, thank you for your reply.

Here is the screenshot of the error

I didn’t mention any action in actions. I only have intent and response.

Hope to hear from you.

@cleong008 please mention me in your reply whilst using @ and then nik202

@cleong008 Did you update or created a custom action in action.py?

@nik202, my actions.py is commented with default actions only. Actually I only rename the name of the intent and the content of the responses to nlu.yml, domain.yml & stories.yml.

@cleong008 If you are not using action.py then why you running the actions by command rasa run actions? @cleong008 we run rasa run actions when we create some custom actions or some code by our own, which fetch the information from rasa server to Rasa SDK server.

rasa server runs on localhost:5005 and Rasa SDK runs on localhost:5055.

@cleong008 Just run rasa shell after rasa train you will be fine and your bot will chat with you, a basic mood bot.

I would encourage you please see the document of rasa in detail. It will clear your thoughts and some doubts.

I hope it’s a solution for you.

@nik202 Thank you for your reply, initially I didn’t run “rasa run actions”, I only run “rasa shell” after “rasa train” based on the documentation and also the Udemy course I am taking by Rasa. But, the error pops up “Failed to run custom action”. Couldn’t connect to the server at ‘http://localhost:5055/webhook’.". That’s why I start to run “rasa run actions”.

@cleong008 share me the screenshot of both terminal. @cleong008 can you share me rasa version by running the command on terminal

rasa --version

@cleong008 can you share the endpoint.yml and credentials.yml ?

@nik202 This is the screenshot after running “rasa shell” without “rasa run actions”

@nik202 This is the version of rasa

@cleong008 see you are using Exercise_name1 as custom action, may be in your story or rules you have mention this under action, that’s why he is throwing you error. If you have not created this in action.py; delete this and you will be fine.

@nik202 Thank you very much for your help. It works.

@cleong008 No worries! Keep learning. Have a great day ahead! Good Luck!

1 Like

@nik202 Have a great day too!

@nik202 Sorry to ask you one more question. I understand that Rasa supports python 3.6 and python 3.7. I am using python 3.8 now, will this creates any negative impact?

@cleong008 No, Rasa uses 3.8. Please see this link as for your reference: Installation

1 Like

@nik202 Thank you very much!

@cleong008 you are welcome!

1 Like

@cleong008 please tick the previous only solution not this one its not related to post. Thanks.

@nik202 Noted! Updated too!

@cleong008 not showing :stuck_out_tongue:

1 Like