Hi, after 2 days I realized that the bot works but it doesn´t work for my Telegram account. I have tested it with 3 other accounts and It works perfectly. When I write whatever text it doesn´t respond, but it does work for other Telegram accounts. When I write from my account it gives me these errors and exceptions and I have no idea what the problem could be.
AttributeError: 'NoneType' object has no attribute 'text'
Exception occurred while handling uri: 'httpt/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/sanic/app.py", line 931, in handle_request
response = await response
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 228, in message
if self._is_user_message(msg):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 180, in _is_user_message
return message.text is not None
AttributeError: 'NoneType' object has no attribute 'text'
Invalid response object for url b'/webhooks/telegram/webhook', Expected Type: HTTPResponse, Actual Type: <class 'NoneType'>
Exception occurred while handling uri: ngrok.io/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/sanic/server.py", line 509, in write_response
response.output(
AttributeError: 'NoneType' object has no attribute 'output'
Exception occurred while handling uri: 'ngrok.io/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/sanic/app.py", line 931, in handle_request
response = await response
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 259, in message
await on_new_message(
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/channel.py", line 89, in handler
await app.agent.handle_message(message)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/agent.py", line 577, in handle_message
return await processor.handle_message(message)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 108, in handle_message
await self._predict_and_execute_next_action(message.output_channel, tracker)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 657, in _predict_and_execute_next_action
action, prediction = self.predict_next_action(tracker)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 379, in predict_next_action
prediction = self._get_next_action_probabilities(tracker)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/processor.py", line 921, in _get_next_action_probabilities
prediction = self.policy_ensemble.probabilities_using_best_policy(
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 817, in probabilities_using_best_policy
winning_prediction = self._best_policy_prediction(tracker, domain, interpreter)
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 694, in _best_policy_prediction
predictions = {
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 695, in <dictcomp>
f"policy_{i}_{type(p).name}": self._get_prediction(
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 729, in _get_prediction
prediction = policy.predict_action_probabilities(
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 576, in predict_action_probabilities
is_unlikely_intent = self._check_unlikely_intent(
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 671, in _check_unlikely_intent
if not self._should_check_for_intent(query_intent, domain):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 633, in _should_check_for_intent
if domain.intents.index(intent) not in self.label_thresholds:
ValueError: 'hu' is not in list
Exception occurred while handling uri: '.ngrok.io/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/sanic/app.py", line 931, in handle_request
response = await response
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 228, in message
if self._is_user_message(msg):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 180, in _is_user_message
return message.text is not None
AttributeError: 'NoneType' object has no attribute 'text'
Exception occurred while handling uri: 'http.ngrok.io/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/sanic/app.py", line 931, in handle_request
response = await response
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 228, in message
if self._is_user_message(msg):
File "/home/sanja/rasa-assistant-mbot/venv/lib/python3.8/site-packages/rasa/core/channels/telegram.py", line 180, in _is_user_message
return message.text is not None
AttributeError: 'NoneType' object has no attribute 'text'