Dispatcher.utter_message(text=output) isn't working

So, I have been working on Rasa 2.2.5 and rasa sdk 2.2.0, It’s been working fine until the last month. But recently the dispatcher.utter_message isn’t working fine.

class ActionFindAndShowTimeZone(Action):

def name(self) -> Text:
    return "action_find_and_show_time_zone"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

    city = tracker.get_slot("city")

    timezone = timezones.get(city)

    if timezone is None:
        output = "Could not find the time zone for {}".format(city)
    else:
        output = "The time zone for {} is {}".format(city, timezone)

    dispatcher.utter_message(text=output)

    return []

Initially when I ask - “What is the time zone for london?” It used to output: Ok, give me a second to look up the time zone of London. The time zone of london is UTC+1:00

Now the output it is throwing is Ok, give me a second to look up the time zone of London. Ok, give me a second to look up the time zone of London. Hello

I have checked the model parser, it is identifying the intent and entity correctly. but dispatcher could not deliver the information, it is repeating the before message twice and giving a default message -“Hi”

Any help is highly appreciated

CollectingDispatcher has one method, utter_message, and one attribute, messages. It is used in an action’s run method to add responses to the payload returned to the Rasa server. The Rasa server will in turn add BotUttered events to the tracker for each response. Responses added using the dispatcher should therefore not be returned explicitly as events. For example, the following custom action returns no events explicitly but will return the response, “Hi, User!” to the user:

class ActionGreetUser(Action): def name(self) → Text: return “action_greet_user”

async def run(
    self,
    dispatcher: CollectingDispatcher,
    tracker: Tracker,
    domain: Dict[Text, Any],
) -> List[EventType]:

    dispatcher.utter_message(text = "Hi, User!")

    return []

More information is here: https://rasa.com/docs/action-server/sdk-dispatcher//GMGlobalConnect

Thanks,

I have been working on Rasa 2.2.5 and rasa sdk 2.2.0, It’s been working fine until the last month.

Exactly, It is acting weird since this month. I hope, I can get some solution from this forum.