kuralabs / iotawatt_ha

We had to fork Home Assistant IoTaWatt integration, people is crazy
Apache License 2.0
10 stars 2 forks source link

AttributeError: 'NoneType' object has no attribute 'text' #3

Open tomlut opened 8 months ago

tomlut commented 8 months ago

Keep getting this error:

This error originated from a custom integration.

Logger: custom_components.iotawatt.coordinator
Source: helpers/update_coordinator.py:313
Integration: IoTaWatt (documentation)
First occurred: 18:36:19 (9 occurrences)
Last logged: 18:40:59

Unexpected error fetching 10.1.1.250 data: 'NoneType' object has no attribute 'text'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iotawatt/coordinator.py", line 76, in _async_update_data
    await self.api.update(lastUpdate=self._last_run)
  File "/usr/local/lib/python3.12/site-packages/iotawattpy/iotawatt.py", line 76, in update
    await self._refreshSensors(timespan, lastUpdate)
  File "/usr/local/lib/python3.12/site-packages/iotawattpy/iotawatt.py", line 154, in _refreshSensors
    results = response.text
              ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'
ibejtm commented 7 months ago

I'm having the same issue while running HA 2024.3.3, but couldn't trace the disconnection to any particular changes on my system. Any advice? Thanks!