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]: Integration can't load - showing invalid config #3271

Open
6 of 7 tasks
ChristophCaina opened this issue Dec 24, 2024 · 23 comments
Open
6 of 7 tasks

[Bug]: Integration can't load - showing invalid config #3271

ChristophCaina opened this issue Dec 24, 2024 · 23 comments

Comments

@ChristophCaina
Copy link
Contributor

I Have A Problem With:

The integration in general

What's Your Problem

Since today, the integration is showing an invalid configuration in HomeAssistant - and won't load anymore.

Source (if relevant)

No response

Logs

Logger: homeassistant.setup
Source: setup.py:416
First occurred: 11:39:24 AM (1 occurrences)
Last logged: 11:39:24 AM

Error during setup of component waste_collection_schedule
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 416, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/waste_collection_schedule/init_yaml.py", line 109, in async_setup
    await hass.async_add_executor_job(
    ...<6 lines>...
    )
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/waste_collection_schedule/waste_collection_api.py", line 88, in add_source_shell
    new_shell = SourceShell.create(
        source_name=source_name,
    ...<3 lines>...
        day_offset=day_offset,
    )
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 217, in create
    source_module: SourceModule = importlib.import_module(
                                  ~~~~~~~~~~~~~~~~~~~~~~~^
        f"waste_collection_schedule.source.{source_name}"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  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 "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py", line 16, in <module>
    from waste_collection_schedule.service.ICS_v1 import ICS_v1
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS_v1.py", line 6, in <module>
    import recurring_ical_events
  File "/usr/local/lib/python3.13/site-packages/recurring_ical_events.py", line 1530, in <module>
    class CalendarQuery:
    ...<193 lines>...
            raise IndexError("No components found.")
  File "/usr/local/lib/python3.13/site-packages/recurring_ical_events.py", line 1547, in CalendarQuery
    icalendar.InvalidCalendar,
    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'icalendar' has no attribute 'InvalidCalendar'

Relevant Configuration

[configuration.yaml]
waste_collection_schedule: !include waste_collection_scheduler.yaml


[waste_collection_scheduler.yaml]
  sources:
    - name: ics
      args:
        url: https://api.abfall.io/?key=76bdaac8568082d77e7a90cb41129f9b&mode=export&idhousenumber=1083&wastetypes=50,53,299,31&timeperiod={%Y}0101-{%Y}1231&showinactive=false&type=ics

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.
@Gloomyeye
Copy link

I can confirm that this bug is introduced with the newest 2025.1 beta version.

@samuel9554
Copy link

I also have this bug in 2025.1 beta.

@hessel-a
Copy link

hessel-a commented Dec 28, 2024

Could it be that Python version 3.13 is the sources of the error. https://rc.home-assistant.io/blog/2024/12/04/release-202412/#weve-upgraded-to-python-313 I also found. https://rc.home-assistant.io/changelogs/core-2025.1 _Look her for: Ensure icalendar==6.1.0 is installed for caldav integration. home-assistant/core#133541

@itsdoublearon
Copy link

Can confirm this bug is happening to me as well, on 2024.12.5

@nobbilie
Copy link

Unfortunately, I also have this problem with the new beta 2025.01

@schmidtfx
Copy link

schmidtfx commented Jan 2, 2025

Some more output from within the home assistant core container:

homeassistant:/config# pip install recurring_ical_events
Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/
Requirement already satisfied: recurring_ical_events in /usr/local/lib/python3.13/site-packages (3.4.0)
Collecting icalendar<7.0.0,>=6.1.0 (from recurring_ical_events)
  Downloading https://wheels.home-assistant.io/musllinux-index/icalendar-6.1.0-py3-none-any.whl (198 kB)
Requirement already satisfied: python-dateutil<3.0.0,>=2.8.1 in /usr/local/lib/python3.13/site-packages (from recurring_ical_events) (2.9.0.post0)
Requirement already satisfied: tzdata in /usr/local/lib/python3.13/site-packages (from recurring_ical_events) (2024.2)
Requirement already satisfied: x-wr-timezone<3.0.0,>=1.0.0 in /usr/local/lib/python3.13/site-packages (from recurring_ical_events) (2.0.0)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.13/site-packages (from python-dateutil<3.0.0,>=2.8.1->recurring_ical_events) (1.17.0)
Requirement already satisfied: click in /usr/local/lib/python3.13/site-packages (from x-wr-timezone<3.0.0,>=1.0.0->recurring_ical_events) (8.1.8)
Installing collected packages: icalendar
  Attempting uninstall: icalendar
    Found existing installation: icalendar 5.0.13
    Uninstalling icalendar-5.0.13:
      Successfully uninstalled icalendar-5.0.13
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
icalevents 0.1.29 requires icalendar==5.0.13, but you have icalendar 6.1.0 which is incompatible.
Successfully installed icalendar-6.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.```

@schmidtfx
Copy link

Is someone looking into this already?

@andreasbrett
Copy link

andreasbrett commented Jan 2, 2025

Waste Collection Schedule has problematic dependencies:

  1. recurring-ical-events v3.4.0 (released Dec 20th 2024)
  1. icalevents v0.1.29 (released Sep 9th 2024)

Until icalevents does change its requirements, WCS will not work unless it gets rid of icalevents.

@5ila5 already addressed this. Fingers crossed, icalevents 0.1.30 will soon be out.

@udochrist
Copy link

Updated to HA 2025.1 and am now getting the error...

@z-master42
Copy link

See #3390 (comment)

@ChristophCaina
Copy link
Contributor Author

Fixed with the linked pr.
Thanks :)

@kwithus
Copy link

kwithus commented Jan 6, 2025

Fixed with the linked pr. Thanks :)

can somebody give a detailed instructions how to fix?

@MTK0815
Copy link

MTK0815 commented Jan 7, 2025

Quick fix (at your own risk, but works perfectly):

Go to “custom_components > waste_collection_schedule > waste_collection_schedule > service”
Delete “ICS_v1.py”
Go to “custom_components > waste_collection_schedule > waste_collection_schedule > source > ics.py”
Comment out line 16 (“from waste_collection_schedule.service.ICS_v1 import ICS_v1”) with #.
Comment out lines 154 to 160 ( “if version ==1” up to “)” ) with #.
Enjoy!

@z-master42
Copy link

The else must also be removed.Only the content of the else must remain, but the indentation must be adjusted. See PR.

@MTK0815
Copy link

MTK0815 commented Jan 7, 2025

I didn't delete the else. Everything works for me

@MelleD
Copy link

MelleD commented Jan 7, 2025

@z-master42 thanks will try that too.
Do you plan to create a PR?

@z-master42
Copy link

I didn't delete the else. Everything works for me

That's luck.

@z-master42
Copy link

@z-master42 thanks will try that too.
Do you plan to create a PR?

There is: #3421. But the more advanced and forward-thinking version is #3468.

@MelleD
Copy link

MelleD commented Jan 7, 2025

@z-master42 thanks will try that too.
Do you plan to create a PR?

There is: #3421. But the more advanced and forward-thinking version is #3468.

Thanks works

@itsdoublearon
Copy link

itsdoublearon commented Jan 9, 2025

Did the manual edit and that worked, but updated to 2.6.0 and it's broken again ☹️

edit: (Using Generic ics feed)

@kwithus
Copy link

kwithus commented Jan 9, 2025

Same here (Germany/Zweckverband Region Hannover (AHA)

@darth-hp
Copy link

darth-hp commented Jan 9, 2025

2.6.0 works for Böblingen api.abfall.io

@lomtaslipptas
Copy link

2.6.0 works for Google Calendar

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