events = action(dispatcher, tracker, domain) File “C:\Users\LENOVO\Desktop\RASA\actions.py”, line 50, in run entities = Tracker.latest_message.Text(‘entities’) AttributeError: type object ‘Tracker’ has no attribute ‘latest_message’ Getting the above error could anyone heklp me to resolve the error .TIA
Hi @MuraliChandran14 Tried getting the same error AttributeError: type object ‘Tracker’ has no attribute ‘latest_message’
Can you share your actions.py
class Search_rest(Action):
def name(self) -> Text:
return "action_search_rest"
def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
entities = Tracker.latest_message.get('entities')
print(entities)
for e in entities:
if e['entity'] == 'hotel':
name=e['value']
if name =='indian':
message = "Gateway,sweet Magic"
if name == 'chinese':
message = 'chin1 , chin2'
if name == 'italian':
message="itl1 , itl2"
if name == "american":
message="ame1 , ame2"
dispatcher.utter_message(text=message)
return []
yes, Thats needs to be changed to small ‘t’ tracker
Thank you .now there is no error but i am getting timeout exception shown below Task exception was never retrieved future: <Task finished coro=<configure_app..run_cmdline_io() done, defined at c:\users\lenovo\appdata\local\programs\python\python37\lib\site-packages\rasa\core\run.py:128> exception=TimeoutError()>
Does your for loop is working fine, can you check?, If its working fine then
Install these requirements
google-auth==1.10.1
prompt-toolkit==2.0.10
questionary==1.4.0
SQLAlchemy==1.3.12
urllib3==1.25.7
I m not sure the requirements will do the job, But lets try and see!
Thank you so much it’s working now. i already have these packages with the below versions google-auth==1.17.2 prompt-toolkit==2.0.10 questionary==1.5.2 SQLAlchemy==1.3.12 i am unable to install the following packages can u please help me with this urllib3==1.25.7