Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aw-qt crashes out of the box #85

Closed
nikanar opened this issue Jul 13, 2017 · 3 comments
Closed

aw-qt crashes out of the box #85

nikanar opened this issue Jul 13, 2017 · 3 comments
Milestone

Comments

@nikanar
Copy link
Contributor

nikanar commented Jul 13, 2017

Just freshly installed activity watch¹. Arch linux, Python 3.6, not in a virtualenv (installing system-wide, hope it's fine). make build works. Tried to run aw-qt, crashed. Trace :

$ aw-qt
2017-07-12 20:31:15,411 [INFO ]: Starting module aw-server  (aw_qt.manager:44)
2017-07-12 20:31:16,129 [INFO ]: Using storage method: peewee  (aw_server.main:25)
2017-07-12 20:31:16,129 [INFO ]: Starting up...  (aw_server.main:30)
2017-07-12 20:31:16,130 [INFO ]: Using database file: /home/will/.local/share/activitywatch/aw-server/peewee-sqlite.v2.db  (aw_datastore.storages.peewee:111)
2017-07-12 20:31:16,182 [INFO ]:  * Running on http://localhost:5600/ (Press CTRL+C to quit)  (werkzeug:87)
2017-07-12 20:31:16,415 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:44)
2017-07-12 20:31:16,420 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:44)
2017-07-12 20:31:16,426 [INFO ]: Creating trayicon...  (aw_qt.trayicon:145)
2017-07-12 20:31:17,040 [INFO ]: Running watcher with poll time 1.0 seconds  (aw_watcher_window.main:35)
Traceback (most recent call last):
  File "/usr/bin/aw-watcher-window", line 11, in <module>
    load_entry_point('aw-watcher-window==0.2', 'console_scripts', 'aw-watcher-window')()
  File "/usr/lib/python3.6/site-packages/aw_watcher_window/main.py", line 41, in main
    client.create_bucket(bucket_id, event_type, queued=True)
TypeError: create_bucket() got an unexpected keyword argument 'queued'
2017-07-12 20:31:17,161 [INFO ]: afkwatcher started  (aw_watcher_afk.afk:65)
2017-07-12 20:31:17,189 [INFO ]: Creating bucket 'aw-watcher-afk_ker'  (aw_datastore.datastore.Datastore:37)
2017-07-12 20:31:17,209 [INFO ]: Connection to aw-server established  (aw_client.client:238)
2017-07-12 20:31:18,250 [INFO ]: Received heartbeat, but bucket was previously empty, inserting as new event. (bucket: aw-watcher-afk_ker)  (aw_server.api:157)
Reading active process stderr...
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/trayicon.py", line 110, in rebuild_modules_menu
show_module_failed_dialog(module)
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/trayicon.py", line 96, in show_module_failed_dialog
    box.setDetailedText(module.stderr())
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/manager.py", line 108, in stderr
    self._log += self._process.stderr.read()
AttributeError: 'NoneType' object has no attribute 'read'
Aborted (core dumped)
$ 

Apparently there are no log files yet, ~/.local/cache doesn't exist.

¹ side note : I found tedious to have to clone every aw-* by hand or else it would fail to make build. I had git cloned the meta-package hoping it would cascade-clone what need be, I feel like missed something.

@johan-bjareholt
Copy link
Member

johan-bjareholt commented Jul 13, 2017

I found tedious to have to clone every aw-* by hand or else it would fail to make build. I had git cloned the meta-package hoping it would cascade-clone what need be, I feel like missed something.

You can do git clone --recursive to clone all the submodules, so you won't need to clone each one manually. We should probably mention that in the readme.

Traceback (most recent call last):
  File "/usr/bin/aw-watcher-window", line 11, in <module>
    load_entry_point('aw-watcher-window==0.2', 'console_scripts', 'aw-watcher-window')()
  File "/usr/lib/python3.6/site-packages/aw_watcher_window/main.py", line 41, in main
    client.create_bucket(bucket_id, event_type, queued=True)
TypeError: create_bucket() got an unexpected keyword argument 'queued'

Sorry, this is our fault. Apparently we merged the latest aw-window PR which was dependent upon ActivityWatch/aw-client#22 without merging that one. So if you simply checkout the dev/improved-queue branch in aw-client it should work. Sorry for the inconvenience!

Reading active process stderr...
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/trayicon.py", line 110, in rebuild_modules_menu
show_module_failed_dialog(module)
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/trayicon.py", line 96, in show_module_failed_dialog
    box.setDetailedText(module.stderr())
  File "/usr/lib/python3.6/site-packages/aw_qt-0.1-py3.6.egg/aw_qt/manager.py", line 108, in stderr
    self._log += self._process.stderr.read()
AttributeError: 'NoneType' object has no attribute 'read'

Seems like we have some broken error handling in aw-qt lol. If you fix the previous issue this should not occur, but i'll create a separate issue in the aw-qt repo for this.

Thanks for testing! :)

@ErikBjare
Copy link
Member

Thanks @johan-bjareholt for explaining the cause and providing a fix, spot on.

And thank you @nikanar for testing, means a lot!

@nikanar
Copy link
Contributor Author

nikanar commented Jul 14, 2017

Thanks. dev/improved-queue was deleted but pulling aw-client did fix it.

Indeed, mentioning git clone --recursive somewhere early in the README would help.

Will keep reporting if things don't behave as expected :)

@nikanar nikanar closed this as completed Jul 14, 2017
@ErikBjare ErikBjare added this to the v0.7 milestone Oct 9, 2017
@xylix xylix mentioned this issue Mar 8, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants