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 window Watcher fail to run on Windows #1095

Open
2 tasks done
TheInspectator opened this issue Aug 16, 2024 · 7 comments
Open
2 tasks done

Aw window Watcher fail to run on Windows #1095

TheInspectator opened this issue Aug 16, 2024 · 7 comments

Comments

@TheInspectator
Copy link

  • I am on the latest ActivityWatch version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS name and version: Windows 11 Home, Version: 23H2
  • ActivityWatch version: v0.13.1

Describe the bug

Module aw-window-watcher won't run.

To Reproduce

Steps to reproduce the behavior, for example:
1. Go to C:\Users<user name>\AppData\Local\Programs\ActivityWatch\aw-watcher-window
2. Click on aw-watcher-window.exe
4. See error

Expected behavior

I expected it to work.

Documentation

The following constantly repeats:
2024-08-16 09:45:39 [INFO ]: Connection to aw-server established by aw-watcher-window (aw_client.client:447)
2024-08-16 09:45:40 [ERROR]: Exception thrown while trying to get active window (aw_watcher_window.main:124)
Traceback (most recent call last):
File "aw_watcher_window\main.py", line 106, in heartbeat_loop
File "aw_watcher_window\lib.py", line 70, in get_current_window
File "aw_watcher_window\lib.py", line 39, in get_current_window_windows
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "aw_watcher_window\windows.py", line 5, in
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.

Additional context

I've since installed python and pywin32 but no change. By the way I found data that it worked a year ago even though I didn't install this till yesterday.

Copy link

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! 🙏

@a-fakhri
Copy link

Same issue here

@Herdo
Copy link

Herdo commented Nov 5, 2024

Got the same issue :(

@heppson
Copy link

heppson commented Dec 9, 2024

Same for me on 0.13.2

@redmondChris
Copy link

Very similar issue happening for me, also. (Ref. https://forum.activitywatch.net/t/no-results-for-aw-watcher-window/3476.)

Similar to @TheInspectator , I'm seeing the following lines in the log, repeated over and over.

2025-02-13 11:44:16 [ERROR]: Exception thrown while trying to get active window  (aw_watcher_window.main:133)
Traceback (most recent call last):
  File "aw_watcher_window\main.py", line 115, in heartbeat_loop
  File "aw_watcher_window\lib.py", line 70, in get_current_window
  File "aw_watcher_window\lib.py", line 39, in get_current_window_windows
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "aw_watcher_window\windows.py", line 5, in <module>
ImportError: DLL load failed while importing win32api: The specified procedure could not be found.

Like @heppson , I'm running 0.13.2.

@MartenMM
Copy link

MartenMM commented Mar 8, 2025

I've delved a bit deeper. This issue appears in 0.13.0 and onwards, rolling back to 0.12.2 fixes this for the time being. I also have 0.13.2 installed on a different machine and on that machine it seems to work most of the time (I'm having different issues there that I need to get to the bottom of).

Edit: I think what fixed it was doing a clean install. After removing 0.12.2 and installing 0.13.2 the issue has yet to re-appear. I'll update this in case the issue returns. The issues also started directly after updating my updating to (without de-installing first) 0.13.2.

@redmondChris
Copy link

@MartenMM - I think I'd previously reinstalled 0.13.2 over itself when trying to work around this. Based on your comment, I just tried a clean install of 0.13.2, and it looks as if aw-watcher-window is functioning again. Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants