Hi, Please need help for my question here:
Before, I was using late version of rasa_core and when updating I had to change the way I do custom actions.
So I start the server of my actions (name of actions file is: actions.py) like:
python -m rasa_core_sdk.ednpoint --actions actions
I get:
INFO:__main__:Starting action endpoint server...
INFO:__main__:Action endpoint is up and running. on ('0.0.0.0', 5055)
And then I do :
python -m rasa_core.run -d models/dialogue --endpoints endpoints.yml
I have a file enpoints.yml like this:
action_endpoint:
url: http://localhost:5055/webhook
When testing my bot, it listen first to the user and then this senario happen:
User: Bonjour
Bot: Bonjour, voulez vous que je vous aide ?
2018-11-27 09:35:40 ERROR rasa_core.actions.action - Failed to run custom action 'action_listen'.
Action server responded with a non 200 status code of 500. Make sure your action server properly runs
actions and returns a 200 once the action is executed. Error: 500 Server Error: INTERNAL SERVER
ERROR for url: http://localhost:5055/webhook
2018-11-27 09:35:40 ERROR rasa_core.processor - Encountered an exception while running action
'action_listen'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your
custom code.
2018-11-27 09:35:40 ERROR rasa_core.processor - Failed to execute custom action.
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\actions\action.py", line 338, in run
response.raise_for_status()
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url:
http://localhost:5055/webhook
Don’t know why, need help please.
EDIT: Now by removing action_listen from domain.yml It worked for action_listen. but now my custom actions are not working. The bot Instead try to do : action_default_fallback
And when saying to the bot (interactive training) that I want him to execute my custom function I got the same error as above (my custom action is ‘action_SendIntentProblemeSite’) :
2018-11-27 09:48:46 ERROR rasa_core.actions.action - Failed to run custom action
'action_SendIntentProblemeSite'. Action server responded with a non 200 status code of 500. Make sure
your action server properly runs actions and returns a 200 once the action is executed. Error: 500 Server
Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook
2018-11-27 09:48:46 ERROR rasa_core.processor - Encountered an exception while running action '
action_SendIntentProblemeSite'. Bot will continue, but the actions events are lost. Make sure to fix the
exception in your custom code.
2018-11-27 09:48:46 ERROR rasa_core.processor - Failed to execute custom action.
in actions.py I have:
class action_SendIntentProblemeSite(Action):
def name(self):
return 'action_SendIntentProblemeSite'
def run(self, dispatcher, tracker, domain):
message = tracker.latest_message.text
#print(message)
return [SlotSet('intent_probleme_site', message)]
In my stories.md In th part were I call this action I do :
* bonjour
- utter_bonjour
* confirmer
- utter_etape1
* probleme_site
- action_SendIntentProblemeSite
In domain.yml :
actions:
- action_SendIntentProblemeSite
Any help?