# RASA dispatch utter message not working

**URL:** <https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380>\
**Category:** Getting Started with Rasa\
**Created:** [May 6, 2019, 10:29am UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380 "2019-05-06T10:29:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![indranil180](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/indranil180/32/4434_2.png) [@indranil180](https://forum.rasa.com/u/indranil180)\
**Post date:** [May 6, 2019, 10:29am UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380/1 "2019-05-06T10:29:02Z")

</div>

i want to use dispatcher.utter\_message to display the message even when slot is not none or not found how can i do. i have written below code for custom action where slot is sometimes not found but i want to dispatch the message. How can i do that. I think the issue is the message is not able to hit class ‘action\_weather’

> from **future** import absolute\_import from **future** import division from **future** import unicode\_literals
> 
> from rasa\_core\_sdk import Action from rasa\_core\_sdk.events import SlotSet import pandas as pd
> 
> df = pd.read\_excel(“C:\Samples\faqxxx.xlsx”)

> class ActionWeather(Action):

> ```
> def name(self):
> return 'action_weather'
> 
> def run(self,dispatcher, tracker, domain):
> loc = tracker.get_slot('faq')
> msg=tracker.latest_message['text']
> print(msg)
> intent_name = tracker.latest_message['intent'].get('name')
> result = df['fixit'][df['faq'] == intent_name]
> dispatcher.utter_message(result[0])
> return [SlotSet('faq', loc)]
> 
> ```

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [May 13, 2019, 4:03pm UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380/2 "2019-05-13T16:03:08Z")

</div>

> I think the issue is the message is not able to hit class ‘action\_weather’

Do you mean that the action `action_weather` is not being called? It’s helpful to talk to your bot in the command line on `--debug` mode to see what actions are being called and run.

---

<div class="post-metadata">

**Author:** ![indranil180](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/indranil180/32/4434_2.png) [@indranil180](https://forum.rasa.com/u/indranil180)\
**Post date:** [May 14, 2019, 11:37am UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380/3 "2019-05-14T11:37:18Z")

</div>

yes that is my issue how can i pass the action with my message to the chatbot ?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [May 14, 2019, 12:47pm UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380/4 "2019-05-14T12:47:35Z")

</div>

If the problem is that your action is not being called, then the issue is with your stories, not your action itself. I would recommend training your bot with interactive learning to make sure your stories are structured correctly.

---

<div class="post-metadata">

**Author:** ![indranil180](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/indranil180/32/4434_2.png) [@indranil180](https://forum.rasa.com/u/indranil180)\
**Post date:** [May 15, 2019, 9:15am UTC](https://forum.rasa.com/t/rasa-dispatch-utter-message-not-working/9380/5 "2019-05-15T09:15:32Z")

</div>

Thanks for the help 🙂
