server
server copied to clipboard
Missing package `tzdata` in `requirements.txt`
When installing required packages via pip3 install -r requirements.txt on Alpine, I get this error when trying to access the /admin page:
...
File "/usr/lib/python3.12/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key UTC'
It was easily fixed by installing the tzdata package:
pip3 install tzdata
Maybe it should be added to the requirements.txt file? Why is it not included although it seems to be auto-generated?
Yeah, it's weird that it's not included by default. Maybe it's an alpine thing? I'm not sure. It definitely works elsewhere (including our docker image).
Maybe it's because your docker image is based on python:3.11.0-alpine and I'm starting with alpine:latest and installing python on top..?
On Arch, this isn't a problem because zoneinfo uses the system zoneinfo files (in /usr/share/zoneinfo/) before falling back to the tzdata module (which means python -c 'import zoneinfo; zoneinfo.ZoneInfo("foo/bar")' also fails with ModuleNotFoundError: No module named 'tzdata').
@Xiretza, how should we solve this? Conditional dep in Alpine (is that possible?), or something else?
Why does it have to be conditional? Is there a problem with it being a dependency on all platforms?
It's better to not have redundant dependencies.
In my opinion this shouldn't be etesync's problem at all, this is a problem with Alpine's python installation. If python -c 'import zoneinfo; zoneinfo.ZoneInfo("UTC")' fails on a fresh install, then the python install is broken.