Skip to content
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

[CalDav] No module named 'recurring_ical_events' #138468

Open
joopdo opened this issue Feb 13, 2025 · 7 comments
Open

[CalDav] No module named 'recurring_ical_events' #138468

joopdo opened this issue Feb 13, 2025 · 7 comments

Comments

@joopdo
Copy link

joopdo commented Feb 13, 2025

The problem

After updating from 2025.2.2 to 2025.2.3, CalDav stopped working.

The calendar is empty and doesn't populate.

What version of Home Assistant Core has the issue?

2025.2.3

What was the last working version of Home Assistant Core?

2025.2.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

caldav

Link to integration documentation on our website

https://www.home-assistant.io/integrations/caldav/

Diagnostics information

No response

Example YAML snippet

Not needed I think. Let me know.

Anything in the logs that might be useful for us?

Logger: homeassistant.components.caldav.coordinator
Source: helpers/update_coordinator.py:380
integration: CalDAV (documentation, issues)
First occurred: 6:34:42 PM (1 occurrences)
Last logged: 6:34:42 PM

Unexpected error fetching CalDAV Suna Joop data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/caldav/coordinator.py", line 96, in _async_update_data
    results = await self.hass.async_add_executor_job(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/caldav/objects.py", line 1105, in search
    o.expand_rrule(start, end)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/caldav/objects.py", line 1796, in expand_rrule
    import recurring_ical_events
ModuleNotFoundError: No module named 'recurring_ical_events'
`

Additional information

No response

@home-assistant
Copy link

@joopdo
Copy link
Author

joopdo commented Feb 13, 2025

After ha core update --version 2025.2.2 the calendar came back. No dependencies on icalendar in my custom_components

@GuruSR
Copy link

GuruSR commented Feb 14, 2025

I am getting a similar issue with 2025.2.3 and the calendar complains it cannot retrieve data, the setup for the calendar works fine.

Same integration: caldav

2025-02-14 01:29:06.696 ERROR (Dummy-1) [aiohttp.server] Error handling request from 192.168.0.240
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/calendar/__init__.py", line 656, in get
    calendar_event_list = await entity.async_get_events(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 201, in async_get_events
    return await self.coordinator.async_get_events(hass, start_date, end_date)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/caldav/coordinator.py", line 60, in async_get_events
    vevent_list = await hass.async_add_executor_job(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/caldav/objects.py", line 1105, in search
    o.expand_rrule(start, end)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/caldav/objects.py", line 1796, in expand_rrule
    import recurring_ical_events
ModuleNotFoundError: No module named 'recurring_ical_events'
2025-02-14 04:00:08.688 ERROR (Dummy-1) [homeassistant.components.speedtestdotnet.coordinator] Error fetching speedtestdotnet data: Unable to connect to servers to test latency.
2025-02-14 05:10:32.504 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 06:31:02.651 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 07:59:02.837 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 08:00:48.097 ERROR (Thread-7) [pychromecast.socket_client] [Living Room TV(192.168.0.61):8009] Error reading from socket: socket connection broken
2025-02-14 08:00:48.108 ERROR (Thread-7) [pychromecast.socket_client] [Living Room TV(192.168.0.61):8009] Failed to connect to service HostServiceInfo(host='192.168.0.61', port=8009), retrying in 5.0s
2025-02-14 08:37:40.010 WARNING (Dummy-1) [custom_components.edgeos.managers.websockets] Failed to store partial message for later processing
2025-02-14 09:03:14.910 ERROR (Dummy-1) [homeassistant.components.ring.coordinator] Error fetching devices data: Timeout communicating with API: Timeout error during query of url https://api.ring.com/clients_api/ring_devices: 
2025-02-14 09:03:32.962 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 09:03:45.910 ERROR (Dummy-1) [homeassistant.components.environment_canada.coordinator] Timeout fetching environment_canada weather data
2025-02-14 09:03:52.963 WARNING (Dummy-1) [homeassistant.components.climate] Updating honeywell climate took longer than the scheduled update interval 0:00:30
2025-02-14 09:04:18.941 ERROR (Dummy-1) [firebase_messaging.fcmpushclient] Unexpected exception during read
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 210, in _do_writer_close
    await writer.wait_closed()
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 358, in wait_closed
    await self._protocol._get_close_waiter(self)
TimeoutError: SSL shutdown timed out
2025-02-14 09:04:18.963 ERROR (Dummy-1) [firebase_messaging.fcmpushclient] Unexpected exception during read
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 210, in _do_writer_close
    await writer.wait_closed()
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 358, in wait_closed
    await self._protocol._get_close_waiter(self)
TimeoutError: SSL shutdown timed out
2025-02-14 09:04:18.967 ERROR (Dummy-1) [firebase_messaging.fcmpushclient] Unexpected exception during read
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 681, in _listen
    elif msg := await self._receive_msg():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 300, in _receive_msg
    r = await self.reader.readexactly(1)  # type: ignore[union-attr]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 758, in readexactly
    raise self._exception
  File "/usr/local/lib/python3.13/site-packages/firebase_messaging/fcmpushclient.py", line 210, in _do_writer_close
    await writer.wait_closed()
  File "/usr/local/lib/python3.13/asyncio/streams.py", line 358, in wait_closed
    await self._protocol._get_close_waiter(self)
TimeoutError: SSL shutdown timed out
2025-02-14 09:04:18.972 ERROR (Dummy-1) [firebase_messaging.fcmpushclient] Shutting down push receiver due to 3 sequential errors of type ErrorType.CONNECTION
2025-02-14 09:04:32.964 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 09:04:52.964 WARNING (Dummy-1) [homeassistant.components.climate] Updating honeywell climate took longer than the scheduled update interval 0:00:30
2025-02-14 09:29:33.011 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 09:29:53.009 WARNING (Dummy-1) [homeassistant.components.climate] Updating honeywell climate took longer than the scheduled update interval 0:00:30
2025-02-14 09:46:33.039 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 09:46:53.040 WARNING (Dummy-1) [homeassistant.components.climate] Updating honeywell climate took longer than the scheduled update interval 0:00:30
2025-02-14 10:54:58.829 WARNING (Dummy-1) [custom_components.edgeos.managers.websockets] Failed to store partial message for later processing
2025-02-14 12:53:33.376 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds
2025-02-14 12:55:33.379 WARNING (Dummy-1) [homeassistant.helpers.entity] Update of climate.main is taking over 10 seconds

This might shed some more light.

@CloCkWeRX
Copy link
Contributor

CloCkWeRX commented Feb 15, 2025

Upstream issues:
python-caldav/caldav#329
niccokunzmann/python-recurring-ical-events#214

The broken release has been yanked, so you might be able to force some kind of reinstall and get the right dependencies now; but it's tricky to say as the dependency is on

caldav==1.3.9

@GuruSR
Copy link

GuruSR commented Feb 15, 2025

Upstream issues: python-caldav/caldav#329 niccokunzmann/python-recurring-ical-events#214

The broken release has been yanked, so you might be able to force some kind of reinstall and get the right dependencies now; but it's tricky to say as the dependency is on

core/requirements_all.txt

Line 686 in 30a6a6a

caldav==1.3.9

Is there a way to do this with the docker version?

@cstosgale
Copy link

So, I hacked a fix in for my docker container by doing the following:

  • Get a shell to the container:
    sudo docker exec -it homeassistant sh
  • On the shell, edit the requirements file manually:
    vi /usr/src/homeassistant/requirements_all.txt
  • Search for the caldav entry using /caldav
  • edit it to read:
    caldav==3.5.1
  • restart the container (without re-creating it)

I'm not sure how best to fix this properly, as requirements_all.txt is auto generated by another script, and I'm not sure how that decides the correct version?

My guess is it needs to be fixed here, which will then get copied to the requirements_all.txt file?

@GuruSR
Copy link

GuruSR commented Feb 17, 2025

I'm guessing waiting for them to fix it is probably best, that fix is temporary, if they change the version and still don't fix it, then it'll be even more of a headache. Not sure why the CalDAV is baked into the HA build, should separate all that out for download, so those who want it, add it, would make fixing the issues with extras not require a HA build to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants