ActivityWatch/aw-watcher-afk

Crash on suspend

johan-bjareholt opened this issue · 2 comments

Seems like the last refactor broke suspend sometimes? It works fine on my desktop but this occured on my laptop just now.

Traceback (most recent call last):
  File "/usr/bin/aw-watcher-afk", line 11, in <module>
    load_entry_point('aw-watcher-afk', 'console_scripts', 'aw-watcher-afk')()
  File "/home/johan/Programming/activitywatch/aw-watcher-afk/aw_watcher_afk/__main__.py", line 28, in main
    watcher.run()
  File "/home/johan/Programming/activitywatch/aw-watcher-afk/aw_watcher_afk/afk.py", line 111, in run
    self.change_state(self.second_last_activity)
AttributeError: 'AFKWatcher' object has no attribute 'second_last_activity'

@johan-bjareholt I have a fix that I forgot to merge.

Edit: nvm, looks like the issue is on your end. Sure you have the latest version? Line 111 in the latest commit does not contain what that traceback claims.

I was running on my dev/next branch which i had branched from the defactoring branch so it is now 3 commits behind master and one of the commits had a fix, so closing this issue.