Parse version error

While trying to deploy activitywatch on windows10. I am getting this error:

(venv) PS C:\Users\Anil Choudhary\Desktop\activitywatch> make build
if [ -e "aw-core/.git" ]; then \
        echo "Submodules seem to already be initialized, continuing..."; \
else \
        git submodule update --init --recursive; \
fi
make --directory=aw-core build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-core'
poetry install
Installing dependencies from lock file

No dependencies to install or update

  - Installing aw-core (0.4.2)
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-core'
make --directory=aw-client build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-client'
poetry install
Installing dependencies from lock file


Package operations: 0 installs, 1 update, 0 removals

  - Updating aw-core (0.4.2 c:\users\anil choudhary\desktop\activitywatch\aw-core -> 0.4.2 6ba8f97)
  - Installing aw-client (0.3.1)
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-client'
make --directory=aw-watcher-afk build
make[1]: Entering directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-afk'
poetry install
Installing dependencies from lock file

[ParseVersionError]
Unable to parse "attr: Xlib.__version_string__".
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory 'C:/Users/Anil Choudhary/Desktop/activitywatch/aw-watcher-afk'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2
(venv) PS C:\Users\Anil Choudhary\Desktop\activitywatch>

I’m not sure why, but it seems like when aw-watcher-afk is being built it seems to think that it’s building for Linux for some reason.

Something seems to be special with your build environment, have you followed the instructions or have you done something differently when building?
https://docs.activitywatch.net/en/latest/installing-from-source-on-windows.html

1 Like

Yes, I am following these instructions:
https://docs.activitywatch.net/en/latest/installing-from-source-on-windows.html

This time I am using windows 10 virtual machine and followed all above steps then I got this error:

(venv) C:\Users\User\Desktop\activitywatch>make build
if [ -e "aw-core/.git" ]; then \
        echo "Submodules seem to already be initialized, continuing..."; \
else \
        git submodule update --init --recursive; \
fi
-e was unexpected at this time.
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 255

In your latest log in fails at the first command (doesn’t understand the “-e” flag).

So your shell that parses that command is for some reason not supporting the “-e” flag (which seems very strange as it’s a very standard flag).

So you need to figure out what kind and what version of the shell that make runs.

1 Like

May you suggest me how can I fix my build environment.
I have tried reinstalling python and node then created a new virtual environment but still got same ParseVersionError.
Before I copied the activityWatch folder( except node_modules and virtual environment folders which were inside it ) which was built on Linux virtual machine and ran command make package on windows system to get a .exe file.

If you first built it on Linux and then copied it over to windows there’s certainly going to be issues if you try to build it because there will be files built for Linux that it will try to re-use on windows which will not work. Sometimes that does not even work between two windows machines if some version of some dependency differs between the machines.

If you want to build for windows build it from a clean folder.

1 Like

It occurs (ParseVersionError) even when i tried to build from a clean folder.

Well, for some reason it tries to build the linux-only python-xlib dependency even though you are running windows which it certainly is not supposed to do. I’m not sure what could possibly make that happen to be honest.

It builds properly in our CI environment so there is something different with your setup.
https://github.com/activitywatch/aw-watcher-afk/actions?query=branch%3Amaster

1 Like

I added the path C:\Program Files\Git\usr\bin in system variables. It solved the issue.

I tried to build on windows 10 virtual machine but I still got same error:

(venv) C:\Users\User\Desktop\activitywatch>make build
if [ -e "aw-core/.git" ]; then \
        echo "Submodules seem to already be initialized, continuing..."; \
else \
        git submodule update --init --recursive; \
fi
Submodules seem to already be initialized, continuing...
make --directory=aw-core build
make[1]: Entering directory 'C:/Users/User/Desktop/activitywatch/aw-core'
poetry install
Installing dependencies from lock file


Package operations: 26 installs, 5 updates, 0 removals

  - Installing more-itertools (8.0.2)
  - Updating zipp (3.1.0 -> 0.6.0)
  - Updating importlib-metadata (1.1.3 -> 1.3.0)
  - Updating pyparsing (2.4.7 -> 2.4.6)
  - Updating six (1.15.0 -> 1.13.0)
  - Installing atomicwrites (1.3.0)
  - Installing colorama (0.4.3)
  - Installing lazy-object-proxy (1.4.3)
  - Installing packaging (19.2)
  - Installing pluggy (0.13.1)
  - Installing py (1.8.1)
  - Installing typed-ast (1.4.0)
  - Installing wcwidth (0.1.7)
  - Installing wrapt (1.11.2)
  - Installing astroid (2.3.3)
  - Installing coverage (5.0.1)
  - Installing isort (4.3.21)
  - Installing mccabe (0.6.1)
  - Installing mypy-extensions (0.4.3)
  - Updating pyrsistent (0.14.11 -> 0.15.6)
  - Installing pytest (5.3.2)
  - Installing typing-extensions (3.7.4.1)
  - Installing appdirs (1.4.3)
  - Installing iso8601 (0.1.12)
  - Installing mypy (0.761)
  - Installing peewee (3.13.1)
  - Installing pylint (2.4.4)
  - Installing pytest-cov (2.8.1)
  - Installing python-json-logger (0.1.11)
  - Installing strict-rfc3339 (0.7)
  - Installing takethetime (0.3.1)
  - Installing aw-core (0.4.2)
make[1]: Leaving directory 'C:/Users/User/Desktop/activitywatch/aw-core'
make --directory=aw-client build
make[1]: Entering directory 'C:/Users/User/Desktop/activitywatch/aw-client'
poetry install
Installing dependencies from lock file


Package operations: 1 install, 5 updates, 0 removals

  - Updating certifi (2020.6.20 -> 2019.11.28)
  - Updating idna (2.10 -> 2.8)
  - Updating urllib3 (1.25.10 -> 1.25.7)
  - Updating aw-core (0.4.2 c:\users\user\desktop\activitywatch\aw-core -> 0.4.2 216e9fc)
  - Installing persist-queue (0.5.0)
  - Updating requests (2.24.0 -> 2.22.0)
  - Installing aw-client (0.3.1)
make[1]: Leaving directory 'C:/Users/User/Desktop/activitywatch/aw-client'
make --directory=aw-watcher-afk build
make[1]: Entering directory 'C:/Users/User/Desktop/activitywatch/aw-watcher-afk'
poetry install
Installing dependencies from lock file

[ParseVersionError]
Unable to parse "attr: Xlib.__version_string__".
Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory 'C:/Users/User/Desktop/activitywatch/aw-watcher-afk'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2