hass-entso-e icon indicating copy to clipboard operation
hass-entso-e copied to clipboard

Frequent crashes, removes existing prices

Open mickut opened this issue 2 years ago • 1 comments

Quite frequently the integration crashes with:

Unexpected error fetching ENTSO-e coordinator data: 'dict_items' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/entsoe/coordinator.py", line 124, in _async_update_data
    for hour, price in self.data["data"].items()[-24:]:
TypeError: 'dict_items' object is not subscriptable

This has a side-effect of clearing the existing price information for the day.

mickut avatar Feb 13 '23 08:02 mickut

I've also seen couple of these.

This error originated from a custom integration.

Logger: custom_components.entsoe.coordinator Source: custom_components/entsoe/coordinator.py:124 Integration: ENTSO-e Transparency Platform (documentation, issues) First occurred: April 24, 2023 at 23:54:07 (1 occurrences) Last logged: April 24, 2023 at 23:54:07

Unexpected error fetching ENTSO-e coordinator data: 'dict_items' object is not subscriptable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/entsoe/coordinator.py", line 124, in _async_update_data for hour, price in self.data["data"].items()[-24:]: TypeError: 'dict_items' object is not subscriptable

pandersin avatar Apr 24 '23 21:04 pandersin

v0.4.0 is released this version contains fixes that solve a lot of warnings and known issues. This issue is probably also solved. Please update to the latest version. Closing this issue for now. If you still have issue please feel free to open a new issue.

Roeland54 avatar Aug 31 '24 11:08 Roeland54