-
Notifications
You must be signed in to change notification settings - Fork 423
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
AttributeError: 'datetime.timezone' object has no attribute 'key #1077
Comments
I had a look at the object
Unfortunately I have no idea how to fix this. |
A workaround is setting a timezone. In alpine: apk add tzdata |
What's It should be either the timezone you have passed (should be This call only returns
Also as ZoneInfo "key" documentation:
|
you should be running O365 version 2.0.34 which requires tzlocal >= 5.0 |
Do you mean the type?
I had not passed any timezone nor changed anything when I encountered the issue. All I did was run the code I posted in my first post. The code failed because no timezone was set. It tried to get an attribute ( I am using |
Well the code did not fail because no timezone was set. The timezone is set but appears to not have a "key" property and that's is because it seems the timezone is not a ZoneInfo object but a datetime.timezone object. Can you please run this on your virtualenv?: import tzlocal
timezone = tzlocal.get_localzone()
print(timezone) |
Sure.
|
Sorry please print(type(timezone)) UTC doesn't gives that much info Thanks |
|
ok I'll open an issue on tzlocal |
My pleasure Alpine 3.19 (if you need that for the issue) |
Hi,
I am just getting started with this library, but I already ran into a problem.
My code:
Error:
I am working on (alpine) linux, but the code seems to try to get a windows timezone?
Any ideas?
The text was updated successfully, but these errors were encountered: