-
Notifications
You must be signed in to change notification settings - Fork 2
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
Notes from installation on a Planet Cosmo #3
Comments
@neilzone the traceback looks truncated; but is it that it truly ends there, and there is no value / empty value? |
I guess {path} is empty, which might be the issue. |
Hmm paperless-ngx/paperless-ngx#1547 Feels like it solves the exact same error; assuming it's a default fallback; or just a better error message |
and Lots of good ideas and prior work in the paperless-ngx repo |
Could regebro/tzlocal#161 be the root-cause of the issue? It's definitely near the bottom of the traceback |
My current status: Not yet able to reproduce this. Investigations: I'm on tzlocal v1.5.1 on my Gemini (unable to upgrade due to being on Python v.3.5). I tried v2.1, v3.0, v4.2, v4.3.1, v5.1 and v5.2 on my laptop (Slackware, Python v3.9). All these worked fine. I also tried deleting /etc/localtime on both the Gemini and laptop to make it "not know" what timezone it was in. This didn't cause issues with Pygenda. The closest I've got to the reported result is to replace /etc/localtime with an empty file. This gives errors in tzlocal: |
@neilzone Could you let me know which version of tzlocal you're using? Since I might later want to know the versions of other date-related Python package dependencies, this command should get them all to save time:
In addition, what is your /etc/localtime file? I'd guess a softlink to something? Could you let me know, and check the file it's pointing to is timezone data (check with something like Thanks! |
Output of
In terms of
and
|
@neilzone I was after /etc/localtime, rather than /etc/timezone. /etc/localtime should be a sym-link pointing to a timezone data file, probably in /usr/share/zoneinfo. (I just tried with tzlocal 5.1 and /etc/localtime pointing to /usr/share/zoneinfo/Etc/UTC and Pygenda started without issue.) |
Oops.
and
|
As far as I can tell, the time configuration of the Cosmo seems valid (although it's set to UTC, which might not be what was desired). However, this combination of OS, Python version and libraries leads to an exception. You could argue that this should be fixed in the underlying components, but since I've not been able to reproduce it (it might require Python 3.7, which I've not tried), Python 3.7 was EOL'ed almost a year ago, and it's on a non-official Debian on a niche device, I wouldn't blame the maintainers for NGTF it. And even if it was fixed, the versions that give the exception would still exist. So I've decided to add code to Pygenda to handle exceptions from get_localzone(), and try another method of getting the timezone, at least on Linux. This code is in the handle-get-localzone-exception branch on github. I've also pushed it to PyPI as a development release 0.3.4.dev0. I've tested it on my devices, but @neilzone, I'd be grateful if you could test the fix by installing the dev version with:
|
Here you go:
I'll try wiping and reinstalling the device when I get a moment, just in case something else, unrelated, is broken. |
Quick note: This is progress. It's got further, so it seems to have set a valid timezone. Now it's failing to set the language to use in the GUI. Unfortunately, it's not reporting what language it's trying to use - it might just be a case of installing the language files (Pygenda looks for the UTF8 version, so maybe the Cosmo has some other encoding installed.) No need to wipe/reinstall. I'm hoping to be able to get my hands on a Cosmo soon. In which case I'll be able to do my own digging. |
If UTF8 were the fallback if a device doesn't have locale set; would that not be safe and available on all semi-modern Linux distro's such as the cosmo environment? Also @neilzone have you tried using |
Also @neilzone are you comfortable using virtualenvironments or venv? |
No |
I tend to use ( I'm not really using the Cosmo; it came out of retirement for me to see if I could get LUKS working (so far, I have failed), and now I basically only turn it on to test stuff here :)) |
…locale, it shows an error notification on the console and tries to continue. This is to address part of issue #3 on GitHub (comment 17 June 2024).
Progress report... I've identified 3 issues here:
I now have fixes for all these merged:
These should be in the next release, hopefully closing this issue. However, to test we'll need to wait until it's on PyPI, since that's the version the install guide gets. I'm leaving the issue open for now, awaiting testing. |
I released Pygenda v0.3.4 last weekend, containing all the relevant changes. I have just re-installed Gemian on my Cosmo and gone through the Cosmo quickstart guide. It all seems to work for me, so I'm marking this issue as fixed. (I'm not sure who will be able to re-open this issue. If you think it needs re-opening, but can't do it yourself, please leave a comment.) Thanks to all for their contributions and help. |
cat /etc/debian_version
returned10.13
.I ran
sudo apt install python3 python3-pip libgtk+3
using the default sources.lists. There are some missing dependencies (below).I ran
pip3 install --user pip==20.3.4
and it completed, but it was not clear to me why I'd pick 20.3.4 rather than 24.Running
pip3 install --user pygenda
failed:with the relevant bit being:
So I ran
sudo apt install libcairo2-dev pkg-config
, re-ranpip3 install --user pygenda
, and it worked.(I also updated
pip
to v24 at this point.)Running
python3 -m pygenda
, I get an error, which I have not attempted to debug:The text was updated successfully, but these errors were encountered: