Issue action listen misbehaving

once you close the interactive learning, it updates the domain file. It puts action_listen in the actions in domain and thus empty action is updated as action listen.

throws this on subsequent runs

The bot wants to run ‘action_listen’, correct? Yes 2018-11-17 13:10:04 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-17 13:10:04 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-17 13:10:04 ERROR rasa_core.processor - Failed to execute custom action.

Hey @tbhavnani. Do you mind opening an issue regarding this on Github?

Hi Tarum, did you find a workaround to this? I am having the same issue, looks like everytime I stop the interactive training the endpoint start to generate this error when I launch interactive again

I will appreciate if you can let me know or if you open an issue in github please let me know as well to track it

Thanks

Yes. everytime you update your domain.yml just remove action_listen and action_restart from the actions. Better way is just to add the default actions in the actions.py. this is a bug as whatever actions are getting used in the interactive learning are getting updated in the domain file. If they are there in the domain file they are no longer the default actions and the core looks for them in the actions.py.

Done. #204.

Awesome! We also have a PR which should fix this beheviour

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?

Hey @chemseddine. Can you tell me what exact version of Rasa Core are you running this with at the moment? There were some issues with interactive learning at the initial release of Rasa Core v0.12 so my first guess that it’s related to you issue.

try action=tracker.latest_message.get(‘text’)

Hey @Juste I’am using v0.12,

I fixed this by doing :

message = tracker.latest_message instead of message = tracker.latest_message.text

Thank you for your answer

Hey @tbhavnani I think it’s related to it what I did to fix this was to do:

message = tracker.latest_message instead of message = tracker.latest_message.text

and then to use the text in the message I use message[‘text’]