mampfes / hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules
MIT License
1.09k stars 663 forks source link

[Bug]: SBAZV Download didn't work anymore #2918

Open MarioHeininger opened 2 weeks ago

MarioHeininger commented 2 weeks ago

I Have A Problem With:

A specific source

What's Your Problem

After upgrade to latest Homeassitant and Wastecollection, the wastecollection didn't work any more.

Logger: custom_components.waste_collection_schedule.waste_collection_schedule.source_shell Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:160 Integration: Waste Collection Schedule (Dokumentation) Erstmals aufgetreten: 13:26:34 (1 Vorkommnisse) Zuletzt protokolliert: 13:26:34

fetch failed for source Südbrandenburgischer Abfallzweckverband: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 339, in parts validate_token(name) File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 128, in validate_token raise ValueError(name) ValueError: <!DOCTYPE html> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 158, in fetch entries: Iterable[Collection] = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/sbazv_de.py", line 57, in fetch dates = self._ics.convert(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 48, in convert events: List[Any] = icalevents.events( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalevents.py", line 57, in events found_events += parse_events( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalparser.py", line 299, in parse_events calendar = Calendar.from_ical(content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/cal.py", line 331, in from_ical name, params, vals = line.parts() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 353, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '<!DOCTYPE html>': <!DOCTYPE html>

Rollback to the previous Version of Wastecollection didn't help

Source (if relevant)

No response

Logs

Logger: custom_components.waste_collection_schedule.waste_collection_schedule.source_shell
Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:160
Integration: Waste Collection Schedule (Dokumentation)
Erstmals aufgetreten: 13:26:34 (1 Vorkommnisse)
Zuletzt protokolliert: 13:26:34

fetch failed for source Südbrandenburgischer Abfallzweckverband: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 339, in parts validate_token(name) File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 128, in validate_token raise ValueError(name) ValueError: <!DOCTYPE html> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 158, in fetch entries: Iterable[Collection] = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/sbazv_de.py", line 57, in fetch dates = self._ics.convert(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 48, in convert events: List[Any] = icalevents.events( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalevents.py", line 57, in events found_events += parse_events( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalparser.py", line 299, in parse_events calendar = Calendar.from_ical(content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/cal.py", line 331, in from_ical name, params, vals = line.parts() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 353, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '<!DOCTYPE html>': <!DOCTYPE html>

Relevant Configuration

No response

Checklist Source Error

Checklist Sensor Error

Required

uh13 commented 2 weeks ago

Hello, I have the same problem. After updating Waste Collection to version 2.3.0 and Homeassistant to version 2024.10.3, Wastecollection for SBAZV no longer works for me. I get the same error message in the log as MarioHeininger.

Here is my log file

The Log:

Logger: custom_components.waste_collection_schedule.waste_collection_schedule.source_shell Quelle: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:160 Integration: Waste Collection Schedule (Dokumentation) Erstmals aufgetreten: 02:47:50 (1 Vorkommnisse) Zuletzt protokolliert: 02:47:50

fetch failed for source Südbrandenburgischer Abfallzweckverband: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 339, in parts validate_token(name) File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 128, in validate_token raise ValueError(name) ValueError: <!DOCTYPE html> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 158, in fetch entries: Iterable[Collection] = self._source.fetch() ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/sbazv_de.py", line 57, in fetch dates = self._ics.convert(r.text) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/service/ICS.py", line 48, in convert events: List[Any] = icalevents.events( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalevents.py", line 57, in events found_events += parse_events( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalevents/icalparser.py", line 299, in parse_events calendar = Calendar.from_ical(content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/cal.py", line 331, in from_ical name, params, vals = line.parts() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/icalendar/parser.py", line 353, in parts raise ValueError( ValueError: Content line could not be parsed into parts: '<!DOCTYPE html>': <!DOCTYPE html>

reentier commented 2 weeks ago

https://github.com/mampfes/hacs_waste_collection_schedule/issues/2870