# Problem with rasa interactive and custom action with dispatcher

**URL:** <https://forum.rasa.com/t/problem-with-rasa-interactive-and-custom-action-with-dispatcher/55449>\
**Category:** Rasa Open Source\
**Created:** [September 21, 2022, 6:01pm UTC](https://forum.rasa.com/t/problem-with-rasa-interactive-and-custom-action-with-dispatcher/55449 "2022-09-21T18:01:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alpacow](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/alpacow/32/21553_2.png) [@alpacow](https://forum.rasa.com/u/alpacow)\
**Post date:** [September 21, 2022, 6:01pm UTC](https://forum.rasa.com/t/problem-with-rasa-interactive-and-custom-action-with-dispatcher/55449/1 "2022-09-21T18:01:17Z")

</div>

Im using Rasa 3.1, not sure why when I use rasa interactive the exception:

```auto
ERROR asyncio - Task exception was never retrieved
future: <Task finished name='Task-6' coro=<SignalRouter._dispatch() done, defined at /home/flan/Documentos/Zapay/teste/venv/lib/python3.8/site-packages/sanic/signals.py:121> exception=ClientResponseError('500, Internal Server Error, body=\'b\'{"description":"Internal Server Error","status":500,"message":"The server encountered an internal error and cannot complete your request."}\'\'')>

```

I created a new and simple bot to use the command.

In action\_session\_start I need to set a slot and dispatch some utterances, when I use **`dispatcher.utter_message("Oii")`** the exception occur, when I remove the utter and just set the slot the interactive learning starts and everything works.

Ive saw [this post](http://forum.rasa.com/t/setting-slots-in-custom-action-error/53973) but in this case I dont use any variables in dispatcher. In the code below I get the exception:

```auto
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet

class ActionSessionStart(Action):
    def name(self) -> Text:
        return "action_session_start"

    def run(
            self, dispatcher, tracker: Tracker, domain: Dict[Text, Any]
    ) -> List[Dict[Text, Any]]:
        A = 1
        if A == 1:
            dispatcher.utter_message("Oii")
            return [SlotSet("tem_protocolo", 'sim')]
        elif A == 2:
            return [SlotSet("tem_protocolo", 'unico')]
        elif A == 3:
            return [SlotSet("tem_protocolo", 'talvez')]
        else:
            return [SlotSet("tem_protocolo", 'nao')]

```

But this works fine:

```auto
om typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet

class ActionSessionStart(Action):
    def name(self) -> Text:
        return "action_session_start"

    def run(
            self, dispatcher, tracker: Tracker, domain: Dict[Text, Any]
    ) -> List[Dict[Text, Any]]:
        A = 1
        if A == 1:
            return [SlotSet("tem_protocolo", 'sim')]
        elif A == 2:
            return [SlotSet("tem_protocolo", 'unico')]
        elif A == 3:
            return [SlotSet("tem_protocolo", 'talvez')]
        else:
            return [SlotSet("tem_protocolo", 'nao')]

```

The error only occur with **`rasa interactive`** I’ve tried

```auto
dispatcher.utter_message("Oii")
dispatcher.utter_message(text="Oii")

```

In the real case I use variables and create dynamic buttons in the responses, thats why I created a new bot to try to figure out the error, but with this simple code the exception persists. Anyone knows what Im missing here?

```auto
Python 3.8.14
Rasa Version : 3.1.0
Minimum Compatible Version: 3.0.0
Rasa SDK Version : 3.1.3
Rasa X Version : None
Python Version : 3.8.14
Operating System : Linux-5.15.65-1-MANJARO-x86_64-with-glibc2.34

```

---

<div class="post-metadata">

**Author:** ![rasa\_learner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rasa_learner/32/21721_2.png) [@rasa\_learner](https://forum.rasa.com/u/rasa_learner)\
**Post date:** [September 21, 2022, 6:25pm UTC](https://forum.rasa.com/t/problem-with-rasa-interactive-and-custom-action-with-dispatcher/55449/2 "2022-09-21T18:25:45Z")

</div>

Here you are customizing the default action “[action\_session\_start](https://rasa.com/docs/rasa/default-actions/#action_session_start)”

1. If it’s not intentional, change the name of your custom action
2. If it’s intentional, you can read more [here](https://rasa.com/docs/rasa/default-actions/#action_session_start) on how to customize the default actions
