briis / affalddk

Home Assistant Integration to retrieve Garbage Collection data from danish Municipalities
MIT License
23 stars 5 forks source link

Affalddk issue with address in Vordingborg kommune #43

Closed neliasen closed 6 months ago

neliasen commented 6 months ago

Describe the issue

Get the following: Logfiler Søg i logfilerne Home Assistant Core Unable to prepare setup for platform 'affalddk.sensor': Platform not found (Exception importing custom_components.affalddk.sensor). 13.17.00 – (FEJL) setup.py Unexpected exception importing platform custom_components.affalddk.sensor 13.16.59 – (FEJL) loader.py

RYD Home Assistant Core

2024-03-21 13:16:59.997 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.affalddk.sensor 2024-03-21 13:17:00.004 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'affalddk.sensor': Platform not found (Exception importing custom_components.affalddk.sensor).

What version of Home Assistant Core has the issue?

core-2024.1.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Diagnostics information

Logger: homeassistant.setup Source: setup.py:403 First occurred: 13.17.00 (1 occurrences) Last logged: 13.17.00

Unable to prepare setup for platform 'affalddk.sensor': Platform not found (Exception importing custom_components.affalddk.sensor).

Anything in the logs that might be useful for us?

Home Assistant Core
2024-03-21 13:16:59.997 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.affalddk.sensor
2024-03-21 13:17:00.004 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'affalddk.sensor': Platform not found (Exception importing custom_components.affalddk.sensor).

Additional information

No response

briis commented 6 months ago

Den er ny. Efter du har downloaded fra HACS, har du så husket at genstarte Home Assistant? Havde du den gamle Renoweb integration installeret? Hvis ja, har du fjernet den helt og genstartet Home Assistant?

neliasen commented 6 months ago

Hejsa Genstartet ja ! Renoweb tidligere installeret: nej anede slet ikke at den her integration eksisterede!

Mvh Niels Eliasen Oregaardsvængevej 1 4720 Præstø Til:+45 21779590 @.***

fre. 22. mar. 2024 kl. 07.59 skrev Bjarne Riis @.***>:

Den er ny. Efter du har downloaded fra HACS, har du så husket at genstarte Home Assistant? Havde du den gamle Renoweb integration installeret? Hvis ja, har du fjernet den helt og genstartet Home Assistant?

— Reply to this email directly, view it on GitHub https://github.com/briis/affalddk/issues/43#issuecomment-2014471630, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA43W5WYLRFH7H7P5KQF7I3YZPJDZAVCNFSM6AAAAABFBSYWM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGQ3TCNRTGA . You are receiving this because you authored the thread.Message ID: @.***>

briis commented 6 months ago

Senere i dag frigiver jeg V2.0.5 af denne Integration. Når du ser den, så prøv lige at installere den, genstart HACS og prøv at sætte integrationen op igen. Jeg har lige testet med din adresse og alt burde virke.

briis commented 6 months ago

V2.0.5 er lige frigivet. Lad mig vide om du stadig har samme problem.

neliasen commented 6 months ago

Hejsa Efter at have fjernet affaldk, genstartet HA, nyinstalleret affalddk og genstartet HA igen… får jeg alligevel en fejl

Logger: homeassistant.loader Source: loader.py:842 First occurred: 10.52.31 (1 occurrences) Last logged: 10.52.31

Unexpected exception importing platform custom_components.affalddk.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 936, in exec_module File "", line 1074, in get_code File "", line 1004, in source_to_code File "", line 241, in _call_with_frames_removed File "/config/custom_components/affalddk/sensor.py", line 297 ATTR_DATE_LONG: f"{_day_name_long} {_date.strftime("d. %d-%m-%Y") if _date else None}" , ^ SyntaxError: f-string: unmatched ‘('

og så lige den her: Invalid config The following integrations and platforms could not be set up:

affalddk.sensor (Show logs http://ds220plus:8123/config/logs?filter=affalddk.sensor) Please check your config and logs http://ds220plus:8123/config/logs.

Den 22. mar. 2024 kl. 15.30 skrev Bjarne Riis @.***>:

V2.0.5 er lige frigivet. Lad mig vide om du stadig har samme problem.

— Reply to this email directly, view it on GitHub https://github.com/briis/affalddk/issues/43#issuecomment-2015229455, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA43W5UUFSL3DLNGXG5IM7LYZQ6A7AVCNFSM6AAAAABFBSYWM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGIZDSNBVGU. You are receiving this because you authored the thread.

mvh/kind regards Niels S. Eliasen Oregaardsvængevej 1 DK-4720 Præstø

@.*** tel: +45 21 77 95 90 HH nummer: +49 40 22863194

briis commented 6 months ago

Når jeg prøver, så virker det fint med din adresse: (Se billede) Hvilken version af Home Assistant kører du? Hvad version af denne integration er installeret?

Skærmbillede 2024-03-26 kl  08 02 05
neliasen commented 6 months ago

Hej Bjarne

Hvis der er nogen andre informationer, som jeg kan sende til dig må du skrive……

Versionen fra HA kan du se i screenshot’tet forneden…..

Loggen fra affaldk.sensor:

Logger: homeassistant.loader Source: loader.py:842 First occurred: 25. marts 2024 kl. 10.57.16 (1 occurrences) Last logged: 25. marts 2024 kl. 10.57.16

Unexpected exception importing platform custom_components.affalddk.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 936, in exec_module File "", line 1074, in get_code File "", line 1004, in source_to_code File "", line 241, in _call_with_frames_removed File "/config/custom_components/affalddk/sensor.py", line 297 ATTR_DATE_LONG: f"{_day_name_long} {_date.strftime("d. %d-%m-%Y") if _date else None}" , ^ SyntaxError: f-string: unmatched '('

Den 26. mar. 2024 kl. 08.03 skrev Bjarne Riis @.***>:

Når jeg prøver, så virker det fint med din adresse: (Se billede) Hvilken version af Home Assistant kører du? Hvad version af denne integration er installeret?

Skaermbillede.2024-03-26.kl.08.02.05.png (view on web) https://github.com/briis/affalddk/assets/24776272/4ed4d2c2-d5a0-4c46-8274-51aecc63e790 — Reply to this email directly, view it on GitHub https://github.com/briis/affalddk/issues/43#issuecomment-2019529174, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA43W5ULCPOXR6WSQ3VIQKDY2EFTVAVCNFSM6AAAAABFBSYWM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJZGUZDSMJXGQ. You are receiving this because you authored the thread.

mvh/kind regards Niels S. Eliasen Oregaardsvængevej 1 DK-4720 Præstø

@.*** tel: +45 21 77 95 90 HH nummer: +49 40 22863194

neliasen commented 6 months ago

Nåja .. og så lige den her fra affalddk.sensor :

Logger: homeassistant.setup Source: setup.py:403 First occurred: 25. marts 2024 kl. 10.57.16 (1 occurrences) Last logged: 25. marts 2024 kl. 10.57.16

Unable to prepare setup for platform 'affalddk.sensor': Platform not found (Exception importing custom_components.affalddk.sensor).

Den 26. mar. 2024 kl. 08.03 skrev Bjarne Riis @.***>:

Når jeg prøver, så virker det fint med din adresse: (Se billede) Hvilken version af Home Assistant kører du? Hvad version af denne integration er installeret?

Skaermbillede.2024-03-26.kl.08.02.05.png (view on web) https://github.com/briis/affalddk/assets/24776272/4ed4d2c2-d5a0-4c46-8274-51aecc63e790 — Reply to this email directly, view it on GitHub https://github.com/briis/affalddk/issues/43#issuecomment-2019529174, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA43W5ULCPOXR6WSQ3VIQKDY2EFTVAVCNFSM6AAAAABFBSYWM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJZGUZDSMJXGQ. You are receiving this because you authored the thread.

mvh/kind regards Niels S. Eliasen Oregaardsvængevej 1 DK-4720 Præstø

@.*** tel: +45 21 77 95 90 HH nummer: +49 40 22863194

briis commented 6 months ago

Jeg kan ikke se det screenshot med HA versionen, men jeg tror ikke du kører den sidste nye version, da jeg kan se den rapporterer Python 3.11 fejl. Python 3.11 er ikke længere supporteret i de sidste nye version af Home Assistent, og modulerne her er også udviklet på Python 3.12, så det kan være der problemet ligger.

EDIT: OK, jeg kan se du kører 2024.1.3 og den kører den stadig Python 3.11 men fra 2024.2 var det kun Python 3.12 der var supporteret. Jeg foreslår du prøver at opgradere din Home Assistant version først, da jeg er ret overbevist om at det er der problemet ligger.

briis commented 6 months ago

Jeg lukker denne nu. Hvis det fortsat ikke virker efter du har opgraderet HA til minimum 2024.2, så post logfilerne og genåben issuet.