Error while working on TwoStageFallbackPolicy


I am trying to incorporate TwoStageFallbackPolicy for my chatbot but I get the following error.

intent_ranking = tracker.latest_message.get("intent_ranking", [])

AttributeError: ‘UserUttered’ object has no attribute ‘get’

Could you let me know the reason for this. Your help is highly appreciated.

Well, tracker.latest_message is not a dict in your case. So, why not just output it, to see what it is?