in a single custom actions that I have, when the line containing dispatcher.utter_message=f"{response}" is executed, the following error is displayed: “2023-02-17 15:44:34 ERROR root - Exception when trying to handle message .decoding to str: need a bytes-like object, NoneType found”. The part of the code that I believe is relevant is the following:
.......
answer = f"{first_name}, customer service 156 thanks you for contacting us!\nWe hope you have {greeting}"
conn = redis.Redis('localhost', port=6379, db=1)
conn.hdel(sender_id, "session", "timestamp")
conn.close()
dispatcher.utter_message(text=f"{response}")
return [Restarted()]
Does anyone have any guidance?