[Linux] aw-server doesn't start (cannot import name 'escape' from 'flask')

I’ve installed ActivityWatch from AUR and whenever I’m trying to launch it I get the “Module aw-server quit unexpectedly” error window and show details only says “No log file found”. When I try to launch the aw-server via console it ends up like this:

Traceback (most recent call last):
File "/usr/bin/aw-server", line 5, in <module>
from aw_server import main
File "/usr/lib/python3.13/site-packages/aw_server/__init__.py", line 6, in <module>
from .main import main
File "/usr/lib/python3.13/site-packages/aw_server/main.py", line 9, in <module>
from .server import _start
File "/usr/lib/python3.13/site-packages/aw_server/server.py", line 19, in <module>
from .custom_static import get_custom_static_blueprint
File "/usr/lib/python3.13/site-packages/aw_server/custom_static.py", line 24, in <module>
from flask import (
...<4 lines>...
)
ImportError: cannot import name 'escape' from 'flask' (/usr/lib/python3.13/site-packages/flask/__init__.py)

Any ideas on how to fix it?

It seems you’ve installed an unofficial ActivityWatch package from the AUR.

We do not provide source-installs like what you are seeing in that stacktrace, we only provide the built binaries to avoid issues like these: AUR (en) - activitywatch-bin

1 Like

Yup, the activitywatch-bin works fine, though the tray icon doesn’t work on Wayland.