jaydeethree / Home-Assistant-weatherdotcom

Home Assistant custom component/integration for Weather.com
GNU General Public License v3.0
46 stars 7 forks source link

Error doing job: Task exception was never retrieved #23

Closed robinhood-code closed 9 months ago

robinhood-code commented 9 months ago

I have been getting this error in HA log since I have updated to the latest version.

Appreciate if anyone can advise the issue.

Logger: homeassistant Source: custom_components/weatherdotcom/sensor.py:126 Integration: Weather.com (documentation, issues) First occurred: 12:04:27 AM (57 occurrences) Last logged: 6:44:42 PM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 243, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners update_callback() File "/config/custom_components/weatherdotcom/sensor.py", line 110, in _handle_coordinator_update self._sensor_data = _get_sensor_data( ^^^^^^^^^^^^^^^^^ File "/config/custom_components/weatherdotcom/sensor.py", line 126, in _get_sensor_data return sensors[RESULTS_CURRENT][kind]


KeyError: 'latitude'
nima-1102 commented 9 months ago

Same here

Integration Version: 1.1.4

Core: 2024.2.0 Supervisor: 2024.01.1 Operating System: 11.5 Frontend: 20240207.0

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/weatherdotcom/sensor.py:126
Integration: Weather.com (documentation, issues)
First occurred: 18:13:07 (1 occurrences)
Last logged: 18:13:07

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
    update_callback()
  File "/config/custom_components/weatherdotcom/sensor.py", line 110, in _handle_coordinator_update
    self._sensor_data = _get_sensor_data(
                        ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/weatherdotcom/sensor.py", line 126, in _get_sensor_data
    return sensors[RESULTS_CURRENT][kind]
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'latitude'
jaydeethree commented 9 months ago

Thanks for reporting this! This should be fixed by https://github.com/jaydeethree/Home-Assistant-weatherdotcom/commit/63f4713fbd07fad1d5cf66bd8a3b88aa17f7a33b and the fix is available in version 1.1.4.1.