core: [homeassistant.components.dexcom] Unexpected error fetching dexcom data: list indices must be integers or slices, not str
The problem
The Dexcom component stopped working yesterday. After HA restart, log contains error:
Dec 01 21:25:57 ha hass[7471]: 2021-12-01 21:25:57 ERROR (MainThread) [homeassistant.components.dexcom] Unexpected error fetching dexcom data: list indices must be integers or slices, not str
Dec 01 21:25:57 ha hass[7471]: Traceback (most recent call last):
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
Dec 01 21:25:57 ha hass[7471]: self.data = await self._async_update_data()
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
Dec 01 21:25:57 ha hass[7471]: return await self.update_method()
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/homeassistant/components/dexcom/__init__.py", line 49, in async_update_data
Dec 01 21:25:57 ha hass[7471]: return await hass.async_add_executor_job(dexcom.get_current_glucose_reading)
Dec 01 21:25:57 ha hass[7471]: File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
Dec 01 21:25:57 ha hass[7471]: result = self.fn(*self.args, **self.kwargs)
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/pydexcom/__init__.py", line 216, in get_current_glucose_reading
Dec 01 21:25:57 ha hass[7471]: glucose_readings = self.get_glucose_readings(minutes=5, max_count=1)
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/pydexcom/__init__.py", line 202, in get_glucose_readings
Dec 01 21:25:57 ha hass[7471]: glucose_readings.append(GlucoseReading(json_glucose_reading))
Dec 01 21:25:57 ha hass[7471]: File "/srv/homeassistant_3_9/lib/python3.9/site-packages/pydexcom/__init__.py", line 44, in __init__
Dec 01 21:25:57 ha hass[7471]: self.trend_description = DEXCOM_TREND_DESCRIPTIONS[self.trend]
Dec 01 21:25:57 ha hass[7471]: TypeError: list indices must be integers or slices, not str
Dec 01 21:25:57 ha hass[7471]: 2021-12-01 21:25:57 WARNING (MainThread) [homeassistant.config_entries] Config entry '*******' for dexcom integration not ready yet: list indices must be integers or slices, not str; Retrying in background
What version of Home Assistant Core has the issue?
core-2021.11.5
What was the last working version of Home Assistant Core?
core-2021.11.5
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Dexcom
Link to integration documentation on our website
https://www.home-assistant.io/integrations/dexcom
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Forum thread: https://community.home-assistant.io/t/dexcom-integration-failed-today
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (2 by maintainers)
pydexcom0.2.1 released, awaiting some validation fromOUSDexcom users prior to bumping Home Assistant version.https://github.com/gagebenne/pydexcom/pull/16
Yep, looking in to it…
https://github.com/gagebenne/pydexcom/issues/15