def run( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List[Dict[Text, Any]]: intent = tracker.latest_message[“intent”].get(“name”)
logger.debug("Detected FAQ intent: {}".format(intent))
if intent in ["faq_spread"]:
message = {
"type": "video",
"payload": {
"title": "6 Steps to Prevent COVID-19",
"src": "https://www.youtube.com/embed/9Ay4u7OYOhA",
},
}
dispatcher.utter_message(
text="Take steps to lower your risk of getting sick with COVID-19. Here are some things you should do.",
attachment=json.dumps(message)
)
Am running this custom action but am getting following error asyncio - Task exception was never retrieved future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at c:\users\bg347848\desktop\covid-chatbot\nora-covid-19-bot\env\lib\site-packages\rasa\core\run.py:128> exception=TypeError(‘must be str, not dict’,)> Traceback (most recent call last): File “c:\users\bg347848\desktop\covid-chatbot\nora-covid-19-bot\env\lib\site-packages\rasa\core\run.py”, line 134, in run_cmdline_io sender_id=conversation_id, File “c:\users\bg347848\desktop\covid-chatbot\nora-covid-19-bot\env\lib\site-packages\rasa\core\channels\console.py”, line 140, in record_messages button_question = print_bot_output(response) File “c:\users\bg347848\desktop\covid-chatbot\nora-covid-19-bot\env\lib\site-packages\rasa\core\channels\console.py”, line 35, in print_bot_output cli_utils.print_color("Attachment: " + message.get(“attachment”), color=color) TypeError: must be str, not dict
rasa version- 1.10