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]: C-Trace: Calendar entity not available anymore #3628

Open
7 tasks done
PyHae opened this issue Jan 18, 2025 · 3 comments
Open
7 tasks done

[Bug]: C-Trace: Calendar entity not available anymore #3628

PyHae opened this issue Jan 18, 2025 · 3 comments

Comments

@PyHae
Copy link

PyHae commented Jan 18, 2025

I Have A Problem With:

The integration in general

What's Your Problem

Hi guys,

I'm using WCS for a while. Since yesterday I do not get any infomatiion any more. Calendar tab is empty!

  • When I click into the entity management I get the information that calendar.c-Trace ist not provided anymore from "wast_collection_schedule"-Integration
  • When I click the 'configuration' button I get the message: 500 Internal Server Error Server got itself in trouble
  • When I try to add the calendar ('Germany' / 'Stadt Bayreuth (c_trace_de)' again or any other calendar I get: 'unknown error occured'

Would be great if you could help

Source (if relevant)

No response

Logs

Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:366
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 13:25:33 (1 Vorkommnisse)
Zuletzt protokolliert: 13:25:33

Error while setting up waste_collection_schedule platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/waste_collection_schedule/sensor.py", line 76, in async_setup_entry
    _LOGGER.debug("Adding sensors for %s", coordinator.shell.calendar_title)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'calendar_title'
------------------------------------------
Logger: homeassistant.components.calendar
Quelle: helpers/entity_platform.py:366
Integration: Kalender (Dokumentation, Probleme)
Erstmals aufgetreten: 13:25:33 (1 Vorkommnisse)
Zuletzt protokolliert: 13:25:33

Error while setting up waste_collection_schedule platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/waste_collection_schedule/calendar.py", line 165, in async_setup_entry
    entities = create_calendar_entries([shell], coordinator=coordinator)
  File "/config/custom_components/waste_collection_schedule/calendar.py", line 129, in create_calendar_entries
    dedicated_calendar_types = shell.get_dedicated_calendar_types()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_dedicated_calendar_types'
---------------------------------------------
Logger: homeassistant.util.loop
Quelle: util/loop.py:136
Erstmals aufgetreten: 13:25:30 (1 Vorkommnisse)
Zuletzt protokolliert: 13:25:30

Detected blocking call to import_module with args ('custom_components.waste_collection_schedule.calendar',) inside the event loop by custom integration 'waste_collection_schedule' at custom_components/waste_collection_schedule/init_ui.py, line 75: await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1304: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please report it to the author of the 'waste_collection_schedule' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 788, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/waste_collection_schedule/init_ui.py", line 75, in async_setup_entry await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
----------------------
Logger: homeassistant.util.loop
Quelle: util/loop.py:136
Erstmals aufgetreten: 13:25:30 (1 Vorkommnisse)
Zuletzt protokolliert: 13:25:30

Detected blocking call to import_module with args ('custom_components.waste_collection_schedule.calendar',) inside the event loop by custom integration 'waste_collection_schedule' at custom_components/waste_collection_schedule/init_ui.py, line 75: await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1304: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please report it to the author of the 'waste_collection_schedule' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 788, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup await self.__async_setup_with_context(hass, integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context result = await component.async_setup_entry(hass, self) File "/config/custom_components/waste_collection_schedule/init_ui.py", line 75, in async_setup_entry await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

Relevant Configuration

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

PyHae commented Jan 18, 2025

Configuration:
HA 2025.1.2
WCS: 2.6.0

@junado
Copy link

junado commented Jan 18, 2025

My integration just started doing this today as well (it was working yesterday).

2025-01-18 16:37:21.721 ERROR (SyncWorker_5) [custom_components.waste_collection_schedule.waste_collection_schedule.source_shell] error loading source ics:
No module named 'icalendar.windows_to_olson' 
Traceback (most recent call last):
  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 15, in <module>
    from waste_collection_schedule.service.ICS import ICS
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 7, in <module>
    from icalevents import icalevents
  File "/usr/local/lib/python3.13/site-packages/icalevents/icalevents.py", line 3, in <module>
    from .icalparser import parse_events, Event
  File "/usr/local/lib/python3.13/site-packages/icalevents/icalparser.py", line 18, in <module>
    from icalendar.windows_to_olson import WINDOWS_TO_OLSON
ModuleNotFoundError: No module named 'icalendar.windows_to_olson'

2025-01-18 16:37:21.724 DEBUG (MainThread) [custom_components.waste_collection_schedule.wcs_coordinator] Finished fetching waste_collection_schedule data in 0.000 seconds (success: True)
2025-01-18 16:37:21.725 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up waste_collection_schedule platform for calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/waste_collection_schedule/calendar.py", line 165, in async_setup_entry
    entities = create_calendar_entries([shell], coordinator=coordinator)
  File "/config/custom_components/waste_collection_schedule/calendar.py", line 129, in create_calendar_entries
    dedicated_calendar_types = shell.get_dedicated_calendar_types()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_dedicated_calendar_types'
2025-01-18 16:37:21.728 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up waste_collection_schedule platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/waste_collection_schedule/sensor.py", line 76, in async_setup_entry
    _LOGGER.debug("Adding sensors for %s", coordinator.shell.calendar_title)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'calendar_title'

I am using a custom .ICS source.

HA 2025.1.2
WCS 2.6.0

@junado
Copy link

junado commented Jan 19, 2025

It looks like my issue was slightly different and updating icalevents to 0.2.0 according to #3488 fixed it.

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

2 participants