JSONDecodeError during build or can't start downloaded zip
- [ X ] I am on the latest ActivityWatch version.
- [ X ] I have searched the issues of this repo and believe that this is not a duplicate.
- OS name and version: Linux Mint 20.2 (Ubuntu 20.04 LTS based)
- ActivityWatch version: don't know - the very latest, from the source code / from the side
Describe the bug
I can't start ZIP downloaded from the site, neither can compile the app.
To Reproduce
make build as per instruction from the site
or
./aw-qt
Expected behavior
Documentation
$ ./aw-qt
[345866] mod is NULL - structTraceback (most recent call last):
File "struct.py", line 14, in <module>
ImportError: cannot import name '_clearcache' from '_struct' (unknown location)
[345866] mod is NULL - pyimod02_archiveTraceback (most recent call last):
File "PyInstaller/loader/pyimod02_archive.py", line 30, in <module>
ModuleNotFoundError: No module named 'struct'
[345866] mod is NULL - pyimod03_importersTraceback (most recent call last):
File "PyInstaller/loader/pyimod03_importers.py", line 26, in <module>
ModuleNotFoundError: No module named 'pyimod02_archive'
Traceback (most recent call last):
File "PyInstaller/loader/pyiboot01_bootstrap.py", line 17, in <module>
ModuleNotFoundError: No module named 'pyimod03_importers'
[345866] Failed to execute script pyiboot01_bootstrap
or
$ 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...
pip install 'setuptools>49.1.1'
Requirement already satisfied: setuptools>49.1.1 in ./venv/lib/python3.8/site-packages (58.4.0)
make --directory=aw-core build
make[1]: Entering directory '/home/alex/Applications/activitywatch/aw-core'
poetry install
Installing dependencies from lock file
Package operations: 0 installs, 2 updates, 0 removals
• Updating coverage (5.5 -> 6.0.2)
• Updating python-json-logger (0.1.11 -> 2.0.2): Failed
JSONDecodeError
Expecting value: line 1 column 1 (char 0)
at ~/.local/lib/python3.8/site-packages/simplejson/decoder.py:400 in raw_decode
396│ if ord0 == 0xfeff:
397│ idx += 1
398│ elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':
399│ idx += 3
→ 400│ return self.scan_once(s, idx=_w(s, idx).end())
401│
make[1]: *** [Makefile:4: build] Error 1
make[1]: Leaving directory '/home/alex/Applications/activitywatch/aw-core'
make: *** [Makefile:30: build] Error 2
Additional context
Don't know... my Linux installation seems to be pretty much normal, I suppose...
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! 🙏
I surely did
I've never seen anything like this aw-qt crash before, can't really help there... (PyInstaller is a mess)
You could always try a nightly? (see https://github.com/ActivityWatch/activitywatch/issues/507)
No idea why your build fails but it doesn't look like you're using a virtualenv, which you definitely should.
I'm surely using virtualenv, otherwise I wouldn't be able to build things at all. Or shall I use virtualenv for an orbitrary app start as well? If so, I'm happy to do so, it's just that it's not documented...
I guess nightly builds - it's the latest main code? If so, that's exactly what I tried to build.
I guess nightly builds - it's the latest main code? If so, that's exactly what I tried to build.
The difference is that the nightly builds are already built, so issues with a potentially misconfigured build environment won't be an issue.
I'm surely using virtualenv, otherwise I wouldn't be able to build things at all. Or shall I use virtualenv for an orbitrary app start as well? If so, I'm happy to do so, it's just that it's not documented...
Ah, I was confused about the line:
~/.local/lib/python3.8/site-packages/simplejson/decoder.py:400 in raw_decode
But I now realize that's from the poetry install. You're of course right that you don't need a venv for running prebuilds.
Still not sure why that happens though.
But as @johan-bjareholt said, the nightly (pre)builds will let you try a more recent version, even if the build mysteriously fails locally.
Thanks! @ErikBjare , may I ask you for the assistance - how do I get ninthly builds then?
And any ideas why build is failing as well? I’m not interested in building thing, I just need it working :) So, if it’s a completely different thing and it’s too complicated, I’m happy to forget about that.
I already linked to them, see issue #507 :)
Agh, didn't get it first... thank you - let me retry with the build from the latest github action :)
Night build works, thanks! Could you please, accept as a feature request to provide snap or deb package for your wonderful software, please?
@alexander-potemkin Nice that it works! Will make a new release soon.
A deb package has been in the works here: https://github.com/ActivityWatch/deb-activitywatch-bin
However, neither me nor @johan-bjareholt use Debian/Ubuntu anymore, so the effort has died out. The goal would be to eventually have a PPA, similar to how we have a PKGBUILD listed on the AUR.
@ErikBjare yes, thank you!
And what about AppImage / Snap package then, that could be installed on any Linux distribution?
And just out of curiosity, if you don’t mind sharing - what did you choose instead of Debian/Ubuntu based distribution and why? Anything you regret about since migration? I’m quite a happy user of Mint distro, don’t like vanilla Ubuntu; nor a RedHat approach for distributions.
And what about AppImage / Snap package then, that could be installed on any Linux distribution?
Same status as the deb, would be nice, but nobody is working on it.
And just out of curiosity, if you don’t mind sharing - what did you choose instead of Debian/Ubuntu based distribution and why? Anything you regret about since migration?
I switched to Arch a few years back. Liking the rolling release nature, the wiki, DIY approach, etc. Still run Debian/Ubuntu on servers. No regrets :)
Got to give it try, thanks!
And thanks for the honest direct answer on the snap, can’t assist here but really enjoy and appreciate whatever you are doing here!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.