I’m running the formbot tutorial https://blog.rasa.com/building-contextual-assistants-with-rasa-formaction and am getting the proper output for the code provided in the tutorial. I’m running with debug turned on.
However, when I make a simple update - adding 6 new cuisine names to actions.py - I get an error “rasa_sdk.endpoint - Failed to extract slot cuisine with action restaurant_form” or “sorry, I didn’t understand you, please try input something else” The first 2 names I added work fine but the last 4 generate errors.
I was careful to ensure that the proper spacing was used on the lines I added. Any ideas why these errors would result?
New Code I added in actions.py def cuisine_db() -> List[Text]: “”“Database of supported cuisines”""
return [
"caribbean",
"chinese",
"french",
"greek",
"indian",
"italian",
"mexican",
"american",
"thai",
"bbq",
"fast food",
"pizza",
"burgers",
]
Debug output: NOTE: the output below shows the error I get when I enter bbq. The second input below when thai is entered for cuisine shows that I was able to successfully add thai to the list of cuisines.
What type of food would you like?
Your input -> bbq
2019-10-30 15:45:53 DEBUG rasa.core.tracker_store - Recreating tracker for id 'default'
2019-10-30 15:45:53 WARNING root - Could not parse timestamp 0263b4c84e164caca9b49947313111e8. Instead current UTC time will be passed to duckling. Error: invalid literal for int() with base 10: '0263b4c84e164caca9b49947313111e8'
2019-10-30 15:45:53 DEBUG rasa.core.processor - Received user message 'bbq' with intent '{'name': 'request_restaurant', 'confidence': 0.7831459045410156}' and entities '[]'
2019-10-30 15:45:53 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 12 events
2019-10-30 15:45:53 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - Current tracker state [None, {}, {'intent_greet': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0}]
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - There is a memorised next action '14'
2019-10-30 15:45:53 DEBUG rasa.core.policies.form_policy - There is an active form 'restaurant_form'
2019-10-30 15:45:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy
2019-10-30 15:45:53 DEBUG rasa.core.processor - Predicted next action 'restaurant_form' with confidence 1.00.
2019-10-30 15:45:53 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'restaurant_form'.
2019-10-30 15:45:53 ERROR rasa.core.actions.action - Failed to extract slot cuisine with action restaurant_form
2019-10-30 15:45:53 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - Current tracker state [{'intent_greet': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0}, {'intent_request_restaurant': 1.0, 'prev_restaurant_form': 1.0, 'active_form_restaurant_form': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0, 'active_form_restaurant_form': 1.0}]
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - There is no memorised next action
2019-10-30 15:45:53 DEBUG rasa.core.policies.form_policy - There is an active form 'restaurant_form'
2019-10-30 15:45:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_FallbackPolicy
2019-10-30 15:45:53 DEBUG rasa.core.processor - Predicted next action 'action_default_fallback' with confidence 0.30.
2019-10-30 15:45:53 DEBUG rasa.core.processor - Action 'action_default_fallback' ended with events '['BotUttered(text: sorry, I didn\'t understand you, please try input something else, data: {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, metadata: {})', 'UserUtteranceReverted()']'
2019-10-30 15:45:53 DEBUG rasa.core.processor - Current slot values:
cuisine: None
feedback: None
num_people: None
outdoor_seating: None
preferences: None
requested_slot: cuisine
2019-10-30 15:45:53 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - Current tracker state [None, {}, {'intent_greet': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0}]
2019-10-30 15:45:53 DEBUG rasa.core.policies.memoization - There is a memorised next action '14'
2019-10-30 15:45:53 DEBUG rasa.core.policies.form_policy - There is an active form 'restaurant_form'
2019-10-30 15:45:53 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, 'request_restaurant'.
2019-10-30 15:45:53 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy
2019-10-30 15:45:53 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2019-10-30 15:45:53 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'
2019-10-30 15:45:53 DEBUG rasa.core.lock_store - Deleted lock for conversation 'default'.
sorry, I didn't understand you, please try input something else
Your input -> thai
2019-10-30 15:48:42 DEBUG rasa.core.tracker_store - Recreating tracker for id 'default'
2019-10-30 15:48:42 WARNING root - Could not parse timestamp d371caa548f84da599d40a8bb5779019. Instead current UTC time will be passed to duckling. Error: invalid literal for int() with base 10: 'd371caa548f84da599d40a8bb5779019'
2019-10-30 15:48:42 DEBUG rasa.core.processor - Received user message 'thai' with intent '{'name': 'inform', 'confidence': 0.7832643985748291}' and entities '[{'start': 0, 'end': 4, 'value': 'thai', 'entity': 'cuisine', 'confidence': 0.5489843690954916, 'extractor': 'CRFEntityExtractor'}]'
2019-10-30 15:48:42 DEBUG rasa.core.processor - Current slot values:
cuisine: None
feedback: None
num_people: None
outdoor_seating: None
preferences: None
requested_slot: cuisine
2019-10-30 15:48:42 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 30 events
2019-10-30 15:48:42 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-10-30 15:48:42 DEBUG rasa.core.policies.memoization - Current tracker state [None, {}, {'intent_greet': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0}]
2019-10-30 15:48:42 DEBUG rasa.core.policies.memoization - There is a memorised next action '14'
2019-10-30 15:48:42 DEBUG rasa.core.policies.form_policy - There is an active form 'restaurant_form'
2019-10-30 15:48:42 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy
2019-10-30 15:48:42 DEBUG rasa.core.processor - Predicted next action 'restaurant_form' with confidence 1.00.
2019-10-30 15:48:42 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'restaurant_form'.
2019-10-30 15:48:42 DEBUG rasa.core.processor - Action 'restaurant_form' ended with events '['BotUttered(text: How many people are in your group?, data: {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, metadata: {"cuisine": "thai", "feedback": null, "num_people": null, "outdoor_seating": null, "preferences": null, "requested_slot": "cuisine"})', 'SlotSet(key: cuisine, value: thai)', 'SlotSet(key: requested_slot, value: num_people)']'
2019-10-30 15:48:42 DEBUG rasa.core.processor - Current slot values:
cuisine: thai
feedback: None
num_people: None
outdoor_seating: None
preferences: None
requested_slot: num_people
2019-10-30 15:48:42 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-10-30 15:48:42 DEBUG rasa.core.policies.memoization - Current tracker state [None, {}, {'intent_greet': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_request_restaurant': 1.0}]
2019-10-30 15:48:42 DEBUG rasa.core.policies.memoization - There is a memorised next action '14'
2019-10-30 15:48:42 DEBUG rasa.core.policies.form_policy - There is an active form 'restaurant_form'
2019-10-30 15:48:42 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, 'inform'.
2019-10-30 15:48:42 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_2_FormPolicy
2019-10-30 15:48:42 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2019-10-30 15:48:42 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'
2019-10-30 15:48:42 DEBUG rasa.core.lock_store - Deleted lock for conversation 'default'.
How many people are in your group?