aw-watcher-window error
aw-watcher-window gets a list index out of range error while trying to get the active window. Here is the stack trace:
Guys-MacBook-Pro:activitywatch guybieber$ source ./venv/bin/activate (venv) Guys-MacBook-Pro:activitywatch guybieber$ aw-watcher-window osascript: /Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/printAppTitle.scpt: No such file or directory 2017-06-01 18:20:09,324 [ERROR]: Exception thrown while trying to get active window: list index out of range (main.py:59) Traceback (most recent call last): File "/Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/main.py", line 56, in main current_window = get_current_window() File "/Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/lib.py", line 49, in get_current_window return get_current_window_macos() File "/Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/lib.py", line 29, in get_current_window_macos title = macos.getTitle(info) File "/Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/macos.py", line 17, in getTitle return info.split('","')[1][:-1] IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/bin/aw-watcher-window", line 11, in
I think I know what is causing this. A fix will be out later today.
Thanks for filing this issue! :)
Fixed now, the culprit was actually in:
osascript: /Users/guybieber/Documents/guy/2016Karmas/Development/source/activitywatch/venv/lib/python3.6/site-packages/aw_watcher_window-0.1-py3.6.egg/aw_watcher_window/printAppTitle.scpt: No such file or directory
The AppleScript we use to get window title was not included in the package. This was fixed in https://github.com/ActivityWatch/aw-watcher-window/commit/85e6fff40d300c83ffcccd512af8d15837e62afa and merged into the bundle repo at https://github.com/ActivityWatch/activitywatch/commit/30a82da913b192e6f1a2623d984714144301d5ae.
Please let us know how this works for you. And again, thanks for filing the issue! :+1:
Awesome job turning around the fix. I will try it today.