G-Two / subarulink

A python package for interacting with Subaru STARLINK remote vehicle services.
Apache License 2.0
84 stars 14 forks source link

Issues after update #29

Closed stboch closed 3 years ago

stboch commented 3 years ago

HA component version 0.2.0 subarulink version 0.3.10 Issues after updates

Unexpected error fetching subaru_data data: cannot unpack non-iterable NoneType object
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/subaru/__init__.py", line 121, in async_update_data
    return await subaru_update(vehicle_info, controller)
  File "/config/custom_components/subaru/__init__.py", line 268, in subaru_update
    await refresh_subaru_data(vehicle, controller)
  File "/config/custom_components/subaru/__init__.py", line 292, in refresh_subaru_data
    update_result = await controller.update(vehicle[VEHICLE_VIN], force=True)
  File "/usr/local/lib/python3.8/site-packages/subarulink/controller.py", line 371, in update
    result = await self._locate(vin, hard_poll=True)
  File "/usr/local/lib/python3.8/site-packages/subarulink/controller.py", line 895, in _locate
    success, js_resp = await self._remote_command(vin, url, poll_url=poll_url)
TypeError: cannot unpack non-iterable NoneType object

2020-12-22 15:44:20 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up subaru platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/subaru/binary_sensor.py", line 128, in async_setup_entry
_create_sensor_entities(entities, vehicle_info[vin], coordinator, hass)
File "/config/custom_components/subaru/binary_sensor.py", line 142, in _create_sensor_entities
if coordinator.data[vehicle_info[VEHICLE_VIN]]["status"].get(subaru_sensor[SENSOR_FIELD]) not in sc.BAD_BINARY_SENSOR_VALUES:
TypeError: 'NoneType' object is not subscriptable
G-Two commented 3 years ago

I'm trying to replicate the error on my end. Is this always happening, or just intermittently?

stboch commented 3 years ago

@G-Two I just went to try it again today and now its working, only thing I can think of is it failed to update the underlying subarulink pypi module.