ics_calendar: Calender Recently Started Failing Due to "recurring_ical_events.InvalidCalendar: The event definition for [...] only contains modifications."

Recently my Google Calendar has disappeared from Home Assistant. When I checked the logs I saw many failures of:

2024-08-26 15:13:38.131 ERROR (SyncWorker_7) [custom_components.ics_calendar.calendar] update: Work: Failed to parse ICS!
Traceback (most recent call last):
  File "/config/custom_components/ics_calendar/calendar.py", line 293, in update
    self.event = self.parser.get_current_event(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ics_calendar/parsers/parser_rie.py", line 117, in get_current_event
    for event in rie.of(self._calendar).between(
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/recurring_ical_events.py", line 1124, in of
    return CalendarQuery(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/recurring_ical_events.py", line 972, in __init__
    component_adapter.collect_components(calendar, self._skip_errors)
  File "/usr/local/lib/python3.12/site-packages/recurring_ical_events.py", line 640, in collect_components
    result.append(Series(components))
                  ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/recurring_ical_events.py", line 335, in __init__
    raise InvalidCalendar(
recurring_ical_events.InvalidCalendar: The event definition for 68bq8tk0lgptlose120drrk0sk@google.com only contains modifications.

Downloading the .ics file myself and looking for that event gave me this (obfuscated, since this is a work calendar)

BEGIN:VEVENT
DTSTART;TZID=America/Edmonton:20231004T130000
DTEND;TZID=America/Edmonton:20231004T160000
DTSTAMP:20240826T184819Z
ORGANIZER;CN=fake.name@business.com:mailto:fake.name@business.com
UID:68bq8tk0lgptlose120drrk0sk@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;PARTSTAT=ACCEPTED;CN=fake.name2@business.com;X-NUM-GUESTS=0:mailto:fake.name2@business.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;CN=fake.name@business.com;X-NUM-GUESTS=0:mailto:fake.name@business.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=fake.name3@business.com;X-NUM-GUESTS=0:mailto:fake.name3@business.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=OPT-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=my.name@business.com;X-NUM-GUESTS=0:mailto:my.name@business.com
X-GOOGLE-CONFERENCE:https://meet.google.com/not-real-url
RECURRENCE-ID;TZID=America/Edmonton:20231004T130000
CREATED:20230914T155513Z
DESCRIPTION:Xxxx recently mentioned that watching people code is interestin
 g. I'm also going to commit to actually coding at this time. Join whenever\
 n\nJoin with Google Meet: https://meet.google.com/not-real-url\nOr dial: (C
 A) +1 647-734-3522 PIN: 123456789#\nMore phone numbers: https://tel.meet/no
 t-real-url?pin=1234567899999&hs=7\n\nLearn more about Meet at: https://supp
 ort.google.com/a/users/answer/9282720
LAST-MODIFIED:20240626T170317Z
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Code Stream
TRANSP:OPAQUE
END:VEVENT

The thing is this event is very old and has been in my calendar for a long time, but it only stopped working recently. I can see from the stack trace this may be in the dependency recurring_ical_events but figured I’d raise this here to validate that before I go opening up tickets upstream.

Thanks Victor

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 27 (7 by maintainers)

Most upvoted comments

I have updated to 5.0 but I am still seeing the issue. I have recently completely migrated my HA system to another device so I haven’t been able to recreate this upstream yet.

There was a new release of recurring-ical-events today, and I don’t observe the problem with it. I also got the time today to finish off the other changes I’ve been very slowly working on, and I’ve made a release today. Please check with version 5.0.0, and report here if that fixes the problems for you. Please pay special attention to the release notes for this version.

It seems that the main issue is probably caused by a dependency of recurring_ical_events, as one of its dependencies is also a dependency of the caldav component of HA. An update to that could easily cause this when using the newer version of HA.

However, the problem that @r0bb10 sees is different. That looks like a direct problem in recurring_ical_events, and is probably unrelated to the other issues. There’s no reason an event has to start before it ends, as setting the same time is common for all day events. When I get the chance, I’ll report these problems upstream. Does going back to the older version of HA fix your problem, too, @r0bb10 ? If so, that suggests somebody added recurring_ical_events as a dependency of HA itself.