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

[Bug]: ModuleNotFoundError: No module named 'icalendar.windows_to_olson' #3488

Open
3 of 7 tasks
jimmybonesde opened this issue Jan 8, 2025 · 11 comments
Open
3 of 7 tasks

Comments

@jimmybonesde
Copy link

I Have A Problem With:

The integration in general

What's Your Problem

something broke the addon

when i want to add a source or add a ical file i get that error

File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py", line 15, in
from waste_collection_schedule.service.ICS import ICS
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 7, in
from icalevents import icalevents
File "/usr/local/lib/python3.13/site-packages/icalevents/icalevents.py", line 3, in
from .icalparser import parse_events, Event
File "/usr/local/lib/python3.13/site-packages/icalevents/icalparser.py", line 18, in
from icalendar.windows_to_olson import WINDOWS_TO_OLSON
ModuleNotFoundError: No module named 'icalendar.windows_to_olson'

no new source can be added

Source (if relevant)

No response

Logs

No response

Relevant Configuration

No response

Checklist Source Error

  • Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  • Checked that the website of your service provider is still working
  • Tested my attributes on the service provider website (if possible)
  • I have tested with the latest version of the integration (master) (for HACS in the 3 dot menu of the integration click on "Redownload" and choose master as version)

Checklist Sensor Error

  • Checked in the Home Assistant Calendar tab if the event names match the types names (if types argument is used)

Required

  • I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  • I understand that people give their precious time for free, and thus I've done my very best to make this problem as easy as possible to investigate.
@dominikfe
Copy link

Same here with HA 2025.1.1

@stefan04
Copy link

stefan04 commented Jan 8, 2025

Same here.
HA 2025.1.1
WasteCollectionSchedule 2.6.0

@ThomPre99
Copy link

Same here.
HA 2025.1.1
WasteCollectionSchedule 2.6.0 (also tested with 2.3.0, 2.4.0 and 2.5.0 without success)

The error also occurs on a freshly installed system

@TheBassfly
Copy link

Same for me.

@BombusAlpinus
Copy link

BombusAlpinus commented Jan 9, 2025

Same for me too...
HA: 2025.1.1
Integration: 2.6.0
but maybe this is related to this issue: #135077

anyway, thanks for your work @mampfes !

@philipp-luettecke
Copy link

I did the "fix" provided in home-assistant/core#135077 and my integration started working again with 2.6.0 and 2025.1.1. So maybe it is not even a misbehavior in the integration but in HA Core instead.
You can check yourself on where the file icalparser.py is located on your system. For me it was /usr/local/lib/python3.13/site-packages/icalevents then just change from icalendar.windows_to_olson import WINDOWS_TO_OLSON to from icalendar.timezone.windows_to_olson import WINDOWS_TO_OLSON and restart HA.

Fixed it for me, but I'm not sure if this has any other implications.
I assume, that there will be a proper fix in HA Core for that.

@TheBassfly
Copy link

This only fixed for me for like 1 or two hours. After that the calendar again removed itself with errors.

@udochrist
Copy link

This seems to be fixed by today's ha update 2025.1.2. at least I don't get the missing import any more.

However now waste collection has created a new device (as duplicate). Any ideas how to get rid of that?

@DarthSonic
Copy link

This seems to be fixed by today's ha update 2025.1.2. at least I don't get the missing import any more.

However now waste collection has created a new device (as duplicate). Any ideas how to get rid of that?

Yes. I have the same issue too. Duplicated device. I disabled the "old ones" as they were unavailable at all. But no way to remove them.

Unfortunately, either Waste Collection Schedule is working OR ICS Calendar. I found no way to fix both integrations.

@stefan04
Copy link

This seems to be fixed by today's ha update 2025.1.2. at least I don't get the missing import any more.

No change for me.
Update today to 2025.1.2
But still in the log...

2025-01-10 22:14:29.574 ERROR (SyncWorker_2) [custom_components.waste_collection_schedule.waste_collection_schedule.source_shell] error loading source ics:
No module named 'icalendar.windows_to_olson'

@andreasbrett
Copy link

needs to be fixed in upstream library icalevents that is not yet icalendar v6 compatible.

jazzband/icalevents#145

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

No branches or pull requests

10 participants