hacs_waste_collection_schedule icon indicating copy to clipboard operation
hacs_waste_collection_schedule copied to clipboard

[Bug]: Setup failed for custom integration 'waste_collection_schedule': Unable to import component: No module named 'waste_collection_schedule.source_shell'

Open iEddy1985 opened this issue 1 year ago • 1 comments

I Have A Problem With:

The integration in general

What's Your Problem

The Integration stopped working.

Source (if relevant)

No response

Logs

Logger: homeassistant.setup
Source: setup.py:251
First occurred: 18:52:02 (1 occurrences)
Last logged: 18:52:02

Setup failed for custom integration 'waste_collection_schedule': Unable to import component: No module named 'waste_collection_schedule.source_shell'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 827, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, 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 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/waste_collection_schedule/__init__.py", line 21, in <module>
    from waste_collection_schedule import Customize, SourceShell  # type: ignore # isort:skip # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/__init__.py", line 3, in <module>
    from .source_shell import Customize, SourceShell  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'waste_collection_schedule.source_shell'

Relevant Configuration

#waste Collection Schedule
waste_collection_schedule:
  sources:
    - name: app_abfallplus_de
      args:
        app_id: de.k4systems.bonnorange
        city: Bonn
        strasse: Bornheimer Str.
        hnr: 54
      customize:
        - type: TYPE
          show: True
      calendar_title: Abfallkalender
sensor:
  - platform: waste_collection_schedule
    name: "Gelbe Tonne"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Gelbe Großbehälter
      - Gelbe Behälter
  - platform: waste_collection_schedule
    name: "Blaue Tonne"
    value_template: '{{value.types|join(", ")}}{% if value.daoysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Papierbehälter
  - platform: waste_collection_schedule
    name: "Graue Tonne"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Graue Großbehälter
      - Graue Großbehälter (verlegt)
      - Restabfallbehälter
  - platform: waste_collection_schedule
    name: "Bio Tonne"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Bioabfallbehälter
  - platform: waste_collection_schedule
    name: "Sperrmüll"
    value_template: '{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}'
    types:
      - Sperrmüll
frontend:

Checklist Source Error

  • [X] Use the example parameters for your source (often available in the documentation) (don't forget to restart Home Assistant after changing the configuration)
  • [X] Checked that the website of your service provider is still working
  • [X] Tested my attributes on the service provider website (if possible)
  • [X] 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

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

Required

  • [X] I have searched past (closed AND opened) issues to see if this bug has already been reported, and it hasn't been.
  • [X] 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.

iEddy1985 avatar Feb 21 '24 18:02 iEddy1985

looks like a broken install. Please try uninstalling and reinstalling this integration and fully restart HA.

5ila5 avatar Feb 22 '24 10:02 5ila5

I had the same problem after triggering an update via HACS. Uninstalling and reinstalling this integration solved the problem for me.

simonsilie avatar Mar 11 '24 09:03 simonsilie

I will close this now as it looks like an installing issue we cannot fix.

5ila5 avatar Mar 13 '24 19:03 5ila5