burnnat / ha-polar

Polar fitness tracking integration for Home Assistant.
MIT License
9 stars 8 forks source link

"Detected I/O inside the event loop"; Only "daily activities" are updated #5

Open gillespinault opened 4 years ago

gillespinault commented 4 years ago

Thanks for this integration! On my instance, only the "daily activities" are updated The log presents those warnings, could it be related?

Log Details (WARNING)
Logger: homeassistant.util.async_
Source: util/async_.py:120
First occurred: 1:09:33 AM (187 occurrences)
Last logged: 2:40:04 PM

- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 84: return getattr(self._accesslink, self._endpoint.name).create_transaction(self._user_id, self._access_token)
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 87: result = getattr(transaction, self._endpoint.list_method)()
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 91: return getattr(transaction, self._endpoint.get_method)(url)
- Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/sensor.py, line 205: transaction.commit()
burnnat commented 4 years ago

Thanks for the report, I'll take a look. 👍

tomecki88 commented 4 years ago

Hi @burnnat, any update regarding this issue? I installed Polar integration and I'm having this same issue:

Logger: homeassistant.util.async_
Source: util/async_.py:120
First occurred: 9:52:37 (2 occurrences)
Last logged: 9:52:38

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/config_flow.py, line 97: token_response = self.accesslink.get_access_token(user_input['code'])
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for polar doing I/O at custom_components/polar/config_flow.py, line 108: self.accesslink.users.register(access_token=data[CONF_ACCESS_TOKEN])

Also entities are not updated.

shaunbarlow commented 3 years ago

Hi @burnnat , I am getting the exact same errors as @tomecki88 Is there anything I can try to get you more info on this error from my side?

burnnat commented 3 years ago

Thanks @shaunbarlow and everyone, I think there's enough info for debugging but unfortunately for personal reasons I haven't had time to work on a fix. I'm hoping to get back in sync with the latest version of Home Assistant (#6) and look at this issue as well over the next few months. Appreciate your patience!