homeassistant-portainer icon indicating copy to clipboard operation
homeassistant-portainer copied to clipboard

KeyError [Bug]

Open jonwaland opened this issue 7 months ago • 13 comments

Describe the issue

Getting KeyError: errors in log

How to reproduce the issue

unknown

Expected behavior

no error

Screenshots

Software versions

  • Home Assistant version: HA CORE 2024.7.2
  • Portainer integration version: v 1.0.2
  • Portainer software version: Community Edition 2.19.5

Diagnostics data

none

Traceback/Error logs

2024-07-16 18:01:34.262 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh
    self.async_update_listeners()
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners
    update_callback()
  File "/home/homeassistant/.homeassistant/custom_components/portainer/entity.py", line 114, in _handle_coordinator_update
    self._data = self.coordinator.data[self.description.data_path][self._uid]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'bd807a5a7ce5d0b970d12819dd796593f9d9668a9e9faa3b370cbfa1c58aa372'

Additional context

none

jonwaland avatar Jul 16 '24 08:07 jonwaland