Error: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'
See original GitHub issueI’m getting an error message when trying to iterate though the calendar events. it then breaks out and give me no data.
Python Version: Python 3.7.3 Installed Version: O365-2.0.14 Host System: Raspberry Pi (Buster)
Calling Code:
o365_mycalendar = Account.schedule().get_default_calendar()
o365_mycalendarEvents = o365_calendar.get_events(limit=20, query=o365_calendarQuery, include_recurring=True)
for o365_event in o365_mycalendarEvents:
print('E ', o365_event.start, o365_event.end, o365_event.subject)
Stack Trace
File "/home/pi/dashdisplay/app_calendar.py", line 214, in process
for o365_event in o365_mycalendarEvents:
File "/usr/local/lib/python3.7/dist-packages/O365/calendar.py", line 1740, in <genexpr>
for event in data.get('value', []))
File "/usr/local/lib/python3.7/dist-packages/O365/calendar.py", line 897, in __init__
cc('recurrence'), None))
File "/usr/local/lib/python3.7/dist-packages/O365/calendar.py", line 137, in __init__
get_windows_tz(self.protocol.timezone))
File "/usr/local/lib/python3.7/dist-packages/O365/utils/windows_tz.py", line 639, in get_windows_tz
iana_tz.zone if isinstance(iana_tz, tzinfo) else iana_tz)
AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'
I’m guessing I have a problem somewhere else (ie a system dependency that is not installed), but can’t track down.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Python ExchangeLib is not working due to the backports ...
PYTZ_TO_MS_MAP[tz.zone][0] AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'. I tried to solve this but couldn't ...
Read more >backports.zoneinfo - PyPI
This exposes the backports. zoneinfo module, which is a backport of the zoneinfo module. The backport's documentation can be found on readthedocs. The...
Read more >Error: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'
I'm getting an error message when trying to iterate though the calendar events. it then breaks out and give me no data. Python...
Read more >[Example code]-Python ExchangeLib is not working due to the ...
PYTZ_TO_MS_MAP[tz.zone][0] AttributeError: 'backports.zoneinfo.ZoneInfo' object has no attribute 'zone'. I tried to solve this but couldn't get the right ...
Read more >zoneinfo — IANA time zone support — Python 3.11.1 ...
By default, zoneinfo uses the system's time zone data if available; if no system time zone data is available, the library will fall...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also solved this issue after tzlocal downgrade
pip install tzlocal==2.1
Workaround: It helped me to manually install tzlocal on version 2.1.