Error when extract recipient_id from json_message in channel rasa

Hi everyone,

When I test rasa with commandline rasa run and rasa run actions in local and connect to telegram or facebook messenger via ngrok, I got the following error:

[ERROR] Exception when trying to handle message.pop() takes at most 1 argument (2 given)

recipient_id = json_message.pop("chat_id", recipient_id)

TypeError: pop() takes at most 1 argument (2 given)

When I check log, json_message in channel is just List with one element.

e.g. json_message = [{“intent”: “carreer”}]

And Telegram returned too many same messages. But in actions logic, bot return only one message and facebook channel is not like that. It’s seem to be telegram listen and pop message in spite of not message from user

How to get recipient_id and fix telegram channel

hey @calipso can you share what your response looks like that you’re trying to send to Telegram? Is this using one of the custom fields?

Here !. Rasa response too many and when I extract json_message (in file channels):

e.g. json_message = [{“intent”: “carreer”}]

Rasa version == 1.9.4

sorry I meant the response in your domain file. Can you share what that looks like?

domain.yml (44.1 KB) Yup, It’s here.

What are you using the custom field intent for? It looks like that’s not a supported field to send to Telegram, which should be causing your issue. Here’s the list of supported custom fields.