Closed panhans closed 1 month ago
Hi, thanks for reporting!
Do you habe the hourly update enabled?
Yes, after disabling it, it works again. So there is a problem with that feature, right?
Yes, i have updated the hourly download to resolve an issue with large memory consumption. This however might have introduced this error.
There is at least one other user who have reported this. I'll have a look into this soon.
I can confirm this issue (DWD 2.1.8, HA 2024.9.1). After disabling the hourly update and reloading the integration, the issue is resolved instantly.
Logs:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.dwd_weather
Quelle: helpers/update_coordinator.py:354
Integration: Deutscher Wetterdienst (Dokumentation, Probleme)
Erstmals aufgetreten: 10:56:16 (10 Vorkommnisse)
Zuletzt protokolliert: 11:01:15
Unexpected error fetching DWD Weather Coordinator for Q440 data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 97, in async_update
if await self._hass.async_add_executor_job(self._update):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 106, in _update
self.dwd_weather.update(
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 673, in update
self.download_latest_kml(self.station_id, force_hourly)
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 1013, in download_latest_kml
self.parse_kml(kml)
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 706, in parse_kml
self.loaded_station_name = self.parse_station_name(tree)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 758, in parse_station_name
return tree.xpath(
^^^^^^^^^^^
IndexError: list index out of range
I implemented a change, which should resolve this error. Please report if the error still exists.
I'd just updated to the latest version. Everything works as expected. Thanks!
Sry, the fix caused a new bug.
Here is my weather data without hourly refresh (correct):
And here with hourly refresh:
Hm, i'll check it again.
I've found the error and fixed it with the latest version :)
On v2.1.11 this bug seems to be back
Can you please provide more info on this. Best would be the log output and your station I'd.
Logger: custom_components.dwd_weather
Quelle: helpers/update_coordinator.py:354
Integration: Deutscher Wetterdienst (Dokumentation, Probleme)
Erstmals aufgetreten: 10:25:26 (15 Vorkommnisse)
Zuletzt protokolliert: 10:36:34
Unexpected error fetching DWD Weather Coordinator for H432 data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 97, in async_update
if await self._hass.async_add_executor_job(self._update):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 106, in _update
self.dwd_weather.update(
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 674, in update
self.download_latest_kml(self.station_id, force_hourly)
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 1028, in download_latest_kml
self.parse_kml(kml)
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 707, in parse_kml
self.loaded_station_name = self.parse_station_name(tree)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/simple_dwd_weatherforecast/dwdforecast.py", line 760, in parse_station_name
return tree.xpath(
^^^^^^^^^^^
IndexError: list index out of range
got the same prob. with the 2.1.11. I switched back to 2.1.10 and the problem is still there. If i disable the hourly update its working! The "funny" thing is, Version 2.1.11 worked fine until today in the evening!!
I've updated the integration. Hopefully it's resolved now.
Resolved. Thanks!
First thank your for your hard work! With the latest version the component isn't working for my anymore.
Version of home_assistant
2024.9.1
Version of the custom_component
2.1.8
(I have to downgrade to 2.1.7)
Describe the bug
No data is provided anymore.
Debug log