Rasa_sdk.executor - Event will be ignored

Hi,

We noticed that when returning dispatcher.utter_template("your_utter", tracker) from a custom function, the rasa_sdk.executor was returning the following error : Your action's 'your_custom_action' run method returned an invalid event. Event w ill be ignored. Event: 'None'. with no observable consequences on code execution wether from calling the utter.template or executing the function entirely, everything works regardeless the error raised.

The error disapeared when we ran the dispatcher.utter_template("your_utter", tracker) outside from the return of the function.

Just so you know and may be some of you might help understand why (might be some pythonic related thing I don’t manage).

Thanks,

z.

The reason it failed in the return is because dispatche.utter_template is not an event. The events are the functions that you import from rasa_sdk.events, like SlotSet or Restarted.

1 Like

Thank you @Gehova !

Indeed it is correct, it surprised me though :

  • that no error was raised when returning a dispatcher.utter_message("your_message") which as I understand is not an event either, on one hand
  • and that despite the error raised, the function ran until its end properly including calling the dispatcher.utter_template("your_utter", tracker) in the return