You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
I am just testing the capabilities of the Twilio connector and when sending a custom json_message, it throws an error as it tries to set the from attribute instead of the from_ attribute.
Error (including full traceback):
[2020-02-20 15:18:23 +0100] [11856] [ERROR] Exception occurred while handling uri: 'http://570158816806510.ngrok.io/webhooks/twilio/webhook'
Traceback (most recent call last):
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/sanic/app.py", line 942, in handle_request
response = await response
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 132, in message
metadata=metadata,
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/channels/channel.py", line 83, in handler
await app.agent.handle_message(*args, **kwargs)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/agent.py", line 486, in handle_message
return await processor.handle_message(message)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/processor.py", line 108, in handle_message
await self._predict_and_execute_next_action(message.output_channel, tracker)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/processor.py", line 509, in _predict_and_execute_next_action
action, tracker, output_channel, self.nlg, policy, confidence
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/processor.py", line 620, in _run_action
await self._send_bot_messages(events, tracker, output_channel)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/processor.py", line 549, in _send_bot_messages
await output_channel.send_response(tracker.sender_id, e.message())
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/channels/channel.py", line 189, in send_response
await self.send_custom_json(recipient_id, message.pop("custom"), **message)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 70, in send_custom_json
await self._send_message(json_message)
File "/home/nicolas/anaconda3/envs/chatbot_sms/lib/python3.7/site-packages/rasa/core/channels/twilio.py", line 37, in _send_message
message = self.messages.create(**message_data)
TypeError: create() got an unexpected keyword argument 'from'
Command or request that led to error:
dispatcher.utter_message(json_message={
"body": "Hello! Here is a cat",
"media_url": "https://i.ytimg.com/vi/uHKfrz65KSU/maxresdefault.jpg"
})
The problem is that the send_custom_json has a mistake here. It tries to set json_message.setdefault("from", self.twilio_number) instead of json_message.setdefault("from_", self.twilio_number)
Content of configuration file (config.yml) (if relevant): Clone of Sara-bot
Content of domain file (domain.yml) (if relevant): Clone of Sara-bot
The text was updated successfully, but these errors were encountered:
nbeuchat
added
the
type:bug 🐛
Inconsistencies or issues which will cause an issue or problem for users or implementors.
label
Feb 20, 2020
Rasa version: 1.7.0
Python version: 3.7
Operating system (windows, osx, ...): Ubuntu
Issue:
I am just testing the capabilities of the Twilio connector and when sending a custom
json_message
, it throws an error as it tries to set thefrom
attribute instead of thefrom_
attribute.Error (including full traceback):
Command or request that led to error:
The problem is that the
send_custom_json
has a mistake here. It tries to setjson_message.setdefault("from", self.twilio_number)
instead ofjson_message.setdefault("from_", self.twilio_number)
Content of configuration file (config.yml) (if relevant): Clone of Sara-bot
Content of domain file (domain.yml) (if relevant): Clone of Sara-bot
The text was updated successfully, but these errors were encountered: