AttributeError: 'dict' object has no attribute 'timestamp'


(Shruti) #1

Hi,

I have pip installed rasa_core ,nlu and sdk and my versions are as follows- rasa_core version: 0.10.4 rasa_core_sdk: 0.11.3 rasa_nlu: 0.13.2

I am edited stories.md,domain.yml and added a actions.py file. The bot trained fine. But when I am trying to run it, the moment my action is called, I get the error-

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/train.py", line 159, in <module>
    additional_arguments)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/train.py", line 129, in train_dialogue_model
    **kwargs)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/agent.py", line 305, in train_online
    input_channel)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/policies/online_trainer.py", line 76, in run_online_training
    input_channel if input_channel else ConsoleInputChannel())
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/agent.py", line 165, in handle_channel
    processor.handle_channel(input_channel)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/processor.py", line 72, in handle_channel
    input_channel.start_sync_listening(self.handle_message)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/channels/console.py", line 60, in start_sync_listening
    self._record_messages(message_handler)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/channels/console.py", line 53, in _record_messages
    self.sender_id))
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/processor.py", line 95, in handle_message
    self._predict_and_execute_next_action(message, tracker)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/processor.py", line 273, in _predict_and_execute_next_action
    dispatcher)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/processor.py", line 320, in _run_action
    self._log_action_on_tracker(tracker, action.name(), events)
  File "/home/zensar/.local/lib/python3.5/site-packages/rasa_core/processor.py", line 383, in _log_action_on_tracker
    e.timestamp = time.time()
AttributeError: 'dict' object has no attribute 'timestamp'

I understand that a similar issue was open github(here) but there the issue seemed that the bot belonged to a different version than rasa_core. But now that I am training my bot in the same environment package that I got with pip, not sure what I should do. Please let me know if any more information is needed. Any suggestions/guidance is appreciated. Thank you, Shruti


(Shruti) #2

Issue solved. plz find the resolution here

Cheers, Shruti


(Jayant) #3

Thank you, saved a lot of time!

EDIT: Still facing the same issue :expressionless: it changed to 'int' object has no attribute 'timestamp'

EDIT2: Fixed it was a bug in my code! :smiley:


(Shruti) #4

I am glad it helped :slight_smile: