-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Celery: ZoneInfoNotFoundError on development instance #10453
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
Comments
I tested by installing tzdata at common.sh entrypoint and it did get rid of that error. |
I had the same issue and I fixed locally in the same way. I don't understand why this doesn't happen in production, tho. Maybe we have a dependency there that installs |
Could there be differences between the production and docker images? Maybe tzdata is available or maybe the fallback that fails in docker works in production? The fallback w/ ZoneInfo can (I believe) use host system tz info. Try this in production?
tzdata is not in any requirements. It would seem like a pretty basic package to include.
|
Just to note that I have the same behavior locally inside Docker. |
@humitos it seems like the fallback behavior works in production.. so that's why we've never seen this error ✔️ In production, Python's tz data is provided by the system itself. But we should be able to make development and production behave the same by adding |
@benjaoming I'm confused. Why it doesn't work on development? |
Oh, I see. There is a system dependency that's not installed in Docker. |
@humitos yes, I think that Docker images have a tendency to be very slim... for regular distros, I can see that for instance Python in Ubuntu has tzdata as "suggested", but I read that it's "required" in the Debian package... or well.. it seems that there isn't a common consensus out there about whether tzdata is supplied as a system stdlib package or not. Which probably caused this. |
@stsewd I tried the new invoke task and it didn't worked 🙃
|
Love the first line of your traceback, containing You might wanna check if this is somehow your Python environment? The error doesn't happen for me. Not sure if |
@humitos yeah, you need to add the package to the pip.in file, and then run that command. |
I got the same error without using |
I just hit this locally when trying to build images for deploy 🙃 I was able to fix it with |
Looks like we need to update our version of celery celery/kombu#1748 (comment) |
I think we definitely want timezone information in our runtime environments. It can probably even lead to more issues handling datetime objects in the future. It should be a safe bet to add it as a requirement. |
I opened #10482 to check if tests are going to pass or not with a full upgrade 🤷🏼 |
I'm getting the following error on my local environment, but didn't get too deep in debugging it yet. This started after a rebuild of my local environment build image.
Looks like either a missing package or a different TZ is needed in our settings.
The text was updated successfully, but these errors were encountered: