ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
11.44k stars 521 forks source link

Module aw-server quit unexpectedly - No log file found #916

Closed ItsTHEAvro closed 1 year ago

ItsTHEAvro commented 1 year ago

Describe the bug

aw-server quits every time ActivityWatch is opened.

To Reproduce

Steps to reproduce the behavior:

  1. Install ActivityWatch
  2. Open ActivityWatch

Expected behavior

aw-server starts. No error message to be shown.

Documentation

Screenshot: image

Logs: aw-qt, aw-watcher-afk, aw-watcher-window, all of there contains logs except aw-server folder. The aw-server folder is empty. aw-qt_2023-07-08T08-53-14.log aw-watcher-afk_2023-07-08T08-53-15.log aw-watcher-window_2023-07-08T08-53-15.log

Additional context

Tried uninstalling, restarting PC, then reinstalling ActivityWatch. Same result.

github-actions[bot] commented 1 year ago

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏

ItsTHEAvro commented 1 year ago

Installing ActivityWatch v0.12.3b3 seems to have fixed this issue.

AuroraTea commented 1 year ago

Installing ActivityWatch v0.12.3b3 seems to have fixed this issue.

Here is ActivityWatch v0.12.3b4, windows x86_64, also

ErikBjare commented 1 year ago

What's the output if you run aw-server.exe from the terminal?

AuroraTea commented 1 year ago

@ErikBjare

PowerShell 7.3.5
PS C:\Users\AuroraTea\AppData\Local\Programs\ActivityWatch> .\aw-server\aw-server.exe
Traceback (most recent call last):
  File "__main__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "aw_server\__init__.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "aw_server\main.py", line 9, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "aw_server\server.py", line 17, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "aw_server\rest.py", line 18, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "flask_restx\__init__.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "flask_restx\reqparse.py", line 15, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "flask_restx\model.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "jsonschema\__init__.py", line 17, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "jsonschema\validators.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "jsonschema_specifications\__init__.py", line 11, in <module>
  File "referencing\_core.py", line 297, in __rmatmul__
  File "jsonschema_specifications\_core.py", line 27, in _schemas
  File "pathlib.py", line 1160, in iterdir
FileNotFoundError: [WinError 3] The system cannot find the specified path: 'C:\\Users\\AuroraTea\\AppData\\Local\\Programs\\ActivityWatch\\aw-server\\jsonschema_specifications\\schemas'
[25436] Failed to execute script '__main__' due to unhandled exception!
ErikBjare commented 1 year ago

That's very helpful and gives me a good clue. Thanks!

ErikBjare commented 1 year ago

Looks like this is handled upstream here: https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/0f40dc6e74086e5472aee75070b9077b4c17ab18

We just need to wait for a new version of pyinstaller-hooks-contrib, update to it, then it should work again.