what is the best way to send a message with the session_start Action. I want this action to allways be send in the very beginning of every conversation. I tried this code snipped:
class ActionSessionStart(Action):
def name(self) -> Text:
return "action_session_start"
async def run(
self, dispatcher, tracker: Tracker, domain: Dict[Text, Any]
) -> List[Dict[Text, Any]]:
dispatcher.utter_message(response="utter_session_start")
# the session should begin with a `session_started` event and an `action_listen`
# as a user message follows
return [SessionStarted(), ActionExecuted("action_listen")]
This does not work in rasa interactive or in the interactive “Talk to your bot” of Rasa X.
I get the following error message:
Encountered an exception while running action 'action_session_start'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
File "/opt/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 869, in _run_action
events = await action.run(
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 750, in run
bot_messages: List[Event] = await self._utter_responses(
File "/opt/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 699, in _utter_responses
generated_response, tracker, output_channel.name(), **response
AttributeError: 'NoneType' object has no attribute 'name'
I am having the same problem here.
Works fine with rasa shell, rasa run actions as well as the channels I configured.
It does not with rasa interactive, though!
same issue here. Works fine with rasa shell & rasa run actions, but error occurs with rasa interactive & rasa run actions.
My action_session_start calls
dispatcher.utter_message(response="utter_welcome")
and then starts a form via
return [FollowupAction("information_form")]
Rasa Version : 3.6.4
Minimum Compatible Version: 3.5.0
Rasa SDK Version : 3.6.1
Python Version : 3.8.17
Operating System : Linux-6.2.0-26-generic-x86_64-with-glibc2.35
2023-08-28 11:03:33 ERROR rasa.core.processor - Encountered an exception while running action 'action_session_start'.Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
Traceback (most recent call last):
File "/home/frischholz/Schreibtisch/Projekte/chatbot/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 960, in _run_action
events = await action.run(
File "/home/frischholz/Schreibtisch/Projekte/chatbot/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 794, in run
bot_messages = await self._utter_responses(
File "/home/frischholz/Schreibtisch/Projekte/chatbot/venv/lib/python3.8/site-packages/rasa/core/actions/action.py", line 728, in _utter_responses
generated_response, tracker, output_channel.name(), **response
AttributeError: 'NoneType' object has no attribute 'name'