mandarons / icloudpy

iCloud web service interface library in Python
Other
188 stars 19 forks source link

Fetching calendars fails due to datetime bug #26

Closed ghost closed 1 year ago

ghost commented 1 year ago

Call api.calendar.events() fails with:

Traceback (most recent call last):
  File "/home/i/test.py", line 42, in <module>
    my_events = api.calendar.events()
  File "/home/i/.local/lib/python3.10/site-packages/icloudpy/services/calendar.py", line 71, in events
    self.refresh_client(from_dt, to_dt)
  File "/home/i/.local/lib/python3.10/site-packages/icloudpy/services/calendar.py", line 51, in refresh_client
    from_dt = datetime(today.year, today.month, first_day)
ValueError: day is out of range for month

Identical issue to so I assume it's the same pre-existing issue copied from pyicloud to icloudpy.

mandarons commented 1 year ago

Can you share steps to reproduce?

mandarons commented 1 year ago

Looks like the OP account is deleted.