O365 / python-o365

A simple python library to interact with Microsoft Graph and Office 365 API
Apache License 2.0
1.65k stars 419 forks source link

ZoneInfo object has no attribute Zone exception #1044

Open geoffda opened 8 months ago

geoffda commented 8 months ago

windows_tz.py, line 638 is now throwing 'ZoneInfo object has no attribute Zone' exception when Calendar.new_event is called.

    iana_tz.zone if isinstance(iana_tz, tzinfo) else iana_tz)

Rolling back to o365 2.0.31 resolves the issue. I tried independently rolling back tzlocal to version 4.3.1, but apparently >=5.0 is required in the latest o365.

topcats commented 8 months ago

hi there

yes they have changed the zoneinfo item

if you edit windows_tz.py and change the iana_tz.zone to iana_tz.key it works. there are 2 places to change this

Invincibear commented 8 months ago

hi there

yes they have changed the zoneinfo item

if you edit windows_tz.py and change the iana_tz.zone to iana_tz.key it works. there are 2 places to change this

This worked for me, thanks!

MarcoMiano commented 8 months ago

going back to tzlocal=4.3.1 works too...