Skip to content

Missing package tzdata in requirements.txt #185

Description

@DrMaxNix

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?

Activity

  1. tasn commented on Sep 2, 2024

    @tasn
    Member

    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).

  2. DrMaxNix commented on Sep 2, 2024

    @DrMaxNix
    Author

    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..?

  3. Xiretza commented on Sep 2, 2024

    @Xiretza
    Contributor

    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').

  4. tasn commented on Sep 2, 2024

    @tasn
    Member

    @Xiretza, how should we solve this? Conditional dep in Alpine (is that possible?), or something else?

  5. DrMaxNix commented on Sep 2, 2024

    @DrMaxNix
    Author

    Why does it have to be conditional? Is there a problem with it being a dependency on all platforms?

  6. tasn commented on Sep 2, 2024

    @tasn
    Member

    It's better to not have redundant dependencies.

  7. Xiretza commented on Sep 3, 2024

    @Xiretza
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions