I’m encountering a strange error while running Rasa on AWS and interacting with a telegram bot (which used to work fine). For some reason, when telegram passes through the initial start value “/start”, I get an error that rasa is looking for an intent called start, which it doesn’t find in telegram. here is the full error:
2021-07-31 21:30:18 DEBUG rasa.core.processor - Received user message '/start' with intent '{'name': 'start', 'confidence': 1.0}' and entities '[]'
2021-07-31 21:30:18 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 4 events.
2021-07-31 21:30:18 DEBUG rasa.core.policies.memoization - Current tracker state:
[state 1] user intent: start | previous action name: action_listen
2021-07-31 21:30:18 DEBUG rasa.core.policies.memoization - There is no memorised next action
2021-07-31 21:30:18 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user text: /start | previous action name: action_listen
2021-07-31 21:30:18 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2021-07-31 21:30:18 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: start | previous action name: action_listen
2021-07-31 21:30:18 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2021-07-31 21:30:18 DEBUG rasa.core.policies.unexpected_intent_policy - Querying for intent `start`.
2021-07-31 21:30:18 DEBUG rasa.core.lock_store - Deleted lock for conversation '1275063227'.
2021-07-31 21:30:18 ERROR rasa.core.channels.telegram - Exception when trying to handle message.'start' is not in list
2021-07-31 21:30:18 DEBUG rasa.core.channels.telegram - 'start' is not in list
Traceback (most recent call last):
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/channels/telegram.py", line 265, in message
metadata=metadata,
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 89, in handler
await app.agent.handle_message(message)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/agent.py", line 577, in handle_message
return await processor.handle_message(message)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 108, in handle_message
await self._predict_and_execute_next_action(message.output_channel, tracker)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 657, in _predict_and_execute_next_action
action, prediction = self.predict_next_action(tracker)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 379, in predict_next_action
prediction = self._get_next_action_probabilities(tracker)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 922, in _get_next_action_probabilities
tracker, self.domain, self.interpreter
File "/home/ubuntu/rasabot/venv/lib/python3.6/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/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 698, in _best_policy_prediction
for i, p in enumerate(self.policies)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 698, in <dictcomp>
for i, p in enumerate(self.policies)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 730, in _get_prediction
tracker, domain, interpreter
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 545, in predict_action_probabilities
domain, sequence_similarities, query_intent
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 639, in _check_unlikely_intent
if not self._should_check_for_intent(query_intent, domain):
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 601, in _should_check_for_intent
if domain.intents.index(intent) not in self.label_thresholds:
ValueError: 'start' is not in list
[2021-07-31 21:30:18 +0000] [26318] [ERROR] Exception occurred while handling uri: 'http://172.17.0.1:5005/webhooks/telegram/webhook'
Traceback (most recent call last):
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/sanic/app.py", line 931, in handle_request
response = await response
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/channels/telegram.py", line 265, in message
metadata=metadata,
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 89, in handler
await app.agent.handle_message(message)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/agent.py", line 577, in handle_message
return await processor.handle_message(message)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 108, in handle_message
await self._predict_and_execute_next_action(message.output_channel, tracker)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
return self.gen.send(None)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 657, in _predict_and_execute_next_action
action, prediction = self.predict_next_action(tracker)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 379, in predict_next_action
prediction = self._get_next_action_probabilities(tracker)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/processor.py", line 922, in _get_next_action_probabilities
tracker, self.domain, self.interpreter
File "/home/ubuntu/rasabot/venv/lib/python3.6/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/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 698, in _best_policy_prediction
for i, p in enumerate(self.policies)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 698, in <dictcomp>
for i, p in enumerate(self.policies)
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/ensemble.py", line 730, in _get_prediction
tracker, domain, interpreter
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 545, in predict_action_probabilities
domain, sequence_similarities, query_intent
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 639, in _check_unlikely_intent
if not self._should_check_for_intent(query_intent, domain):
File "/home/ubuntu/rasabot/venv/lib/python3.6/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 601, in _should_check_for_intent
if domain.intents.index(intent) not in self.label_thresholds:
ValueError: 'start' is not in list