fordpass-ha icon indicating copy to clipboard operation
fordpass-ha copied to clipboard

Error doing job: Task exception was never retrieved

Open Johnnyyr opened this issue 3 years ago • 4 comments

Logger: homeassistant Source: custom_components/fordpass/sensor.py:180 Integration: FordPass (documentation, issues) First occurred: 13:51:03 (2 occurrences) Last logged: 13:56:04

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in _async_write_ha_state extra_state_attributes = self.extra_state_attributes File "/config/custom_components/fordpass/sensor.py", line 384, in extra_state_attributes return self.get_value("attribute") File "/config/custom_components/fordpass/sensor.py", line 180, in get_value if self.options[CONF_DISTANCE_UNIT] == "mi": KeyError: 'distance_unit'

Johnnyyr avatar Feb 05 '22 13:02 Johnnyyr

Similar issue here: Logger: homeassistant Source: util/speed.py:45 First occurred: February 5, 2022, 10:18:15 PM (3 occurrences) Last logged: 12:58:15 AM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 565, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 237, in state_attributes self.hass.config.units.wind_speed(wind_speed, unit), File "/usr/src/homeassistant/homeassistant/util/unit_system.py", line 167, in wind_speed return speed_util.convert(wind_speed, from_unit, self.wind_speed_unit) # type: ignore File "/usr/src/homeassistant/homeassistant/util/speed.py", line 45, in convert raise ValueError(UNIT_NOT_RECOGNIZED_TEMPLATE.format(unit_1, SPEED)) ValueError: mi/h is not a recognized speed unit.

Additional errors:

Logger: homeassistant Source: components/websocket_api/connection.py:143 First occurred: 12:48:38 AM (1 occurrences) Last logged: 12:48:38 AM

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/config/device_registry.py", line 66, in websocket_update_device msg["disabled_by"] = DeviceEntryDisabler(msg["disabled_by"]) File "/usr/local/lib/python3.9/enum.py", line 384, in call return cls.new(cls, value) File "/usr/local/lib/python3.9/enum.py", line 702, in new raise ve_exc ValueError: None is not a valid DeviceEntryDisabler

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 29, in _handle_async_response connection.async_handle_exception(msg, err) File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 143, in async_handle_exception self.send_message(messages.error_message(msg["id"], code, err_message)) KeyError: 'id'

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/fordpass/fordpass_new.py:374 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 1:15:30 AM (3 occurrences) Last logged: 1:20:22 AM

[1715878064] 'status' [1687165872] 'status' [1755846640] 'status' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 190, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1630, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1667, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 668, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 921, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 705, in _handle_entity_call await result File "/config/custom_components/fordpass/switch.py", line 41, in async_turn_on await self.coordinator.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/fordpass/fordpass_new.py", line 290, in start return self.__requestAndPoll( File "/config/custom_components/fordpass/fordpass_new.py", line 391, in __requestAndPoll return self.__pollStatus(url, result["commandId"]) File "/config/custom_components/fordpass/fordpass_new.py", line 374, in __pollStatus if result["status"] == 552: KeyError: 'status'

nwykoff avatar Feb 06 '22 06:02 nwykoff

Is this a new install or an upgrade from previous before I made the change in 1.13? Can you just try going to the fordpass options screen and hitting save/submit to update the values.

itchannel avatar Feb 15 '22 21:02 itchannel

I occasionally have such errors too, with slightly different line numbers:

(MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 536, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 569, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 542, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/fordpass/sensor.py", line 376, in state
return self.get_value("state")
File "/config/custom_components/fordpass/sensor.py", line 72, in get_value
return self.coordinator.data[self.sensor]["value"]
TypeError: 'NoneType' object is not subscriptable

With 'occasionally', I mean 11 times this year.

Bert-R avatar Feb 16 '22 07:02 Bert-R

It looks like certain sensor values are blank when receiving data back from your car. Can you please add the following to HA to provide more indepth logging so I can see what data is missing:

logger:
  logs:
    custom_components.fordpass: debug

itchannel avatar Feb 21 '22 21:02 itchannel

Closing old issue for housekeeping

Please reopen if the issue is still present :)

itchannel avatar Oct 14 '23 09:10 itchannel