kdeyev / eyeonwater

HACS repository for EyeOnWater integration
MIT License
26 stars 6 forks source link

warning: Detected blocking call to open with args with HA 2024.9 #109

Closed arpitgupta closed 1 month ago

arpitgupta commented 1 month ago

Running v2.5.9 HA: 2024.9.1

2024-09-15 09:22:56.839 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/Africa/Abidjan', 'rb') inside the event loop by custom integration 'eyeonwater' at custom_components/eyeonwater/coordinator.py, line 43: await meter.read_historical_data( (offender: /usr/local/lib/python3.12/site-packages/pytz/__init__.py, line 108: return open(filename, 'rb')), please report it to the author of the 'eyeonwater' custom integration
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
kdeyev commented 1 month ago

@arpitgupta Thank you for reporting the issue. I think the 2.5.10-beta.1 version should fix the warning.

bsp9493 commented 1 month ago

Running 2.5.11

Logger: homeassistant.util.loop Source: util/loop.py:136 First occurred: 7:22:26 AM (1 occurrences) Last logged: 7:22:26 AM

Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/US/Pacific', 'rb') inside the event loop by custom integration 'eyeonwater' at custom_components/eyeonwater/coordinator.py, line 43: await meter.read_historical_data( (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please report it to the author of the 'eyeonwater' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data return await self.update_method() File "/config/custom_components/eyeonwater/init.py", line 52, in async_update_data await eye_on_water_data.read_meters(days_to_load=3) File "/config/custom_components/eyeonwater/coordinator.py", line 43, in read_meters await meter.read_historical_data(

kdeyev commented 1 month ago

@bsp9493 could you please test v2.5.12-beta.1? It was reported that the blocking call resolution breaks whole integration. I'm using the v2.5.12-beta.1 version and do not see any issues, but I would like to receive another confirmation before I release v2.5.12 officially. Thank you for your assistance!

bsp9493 commented 1 month ago

Will load shortly and let you know.dOn Sep 27, 2024, at 6:44 AM, Konstantin Deev @.***> wrote: @bsp9493 could you please test v2.5.12-beta.1? It was reported that the blocking call resolution breaks whole integration. I'm using the v2.5.12-beta.1 version and do not see any issues, but I would like to receive another confirmation before I release v2.5.12 officially. Thank you for your assistance!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

bsp9493 commented 1 month ago

Up and running 24 hrs plus, looks good:)Thanx!dOn Sep 27, 2024, at 7:17 AM, David Morhun @.> wrote:Will load shortly and let you know.dOn Sep 27, 2024, at 6:44 AM, Konstantin Deev @.> wrote: @bsp9493 could you please test v2.5.12-beta.1? It was reported that the blocking call resolution breaks whole integration. I'm using the v2.5.12-beta.1 version and do not see any issues, but I would like to receive another confirmation before I release v2.5.12 officially. Thank you for your assistance!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kdeyev commented 1 month ago

@bsp9493 Thank you for the confirmation. The v2.5.12 has been released

bsp9493 commented 1 month ago

Nope…Issue is back with release version….Switched back to betaLogger: homeassistant.util.loopSource: util/loop.py:136First occurred: 6:00:36 PM (1 occurrences)Last logged: 6:00:36 PMDetected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/pytz/zoneinfo/US/Pacific', 'rb') inside the event loop by custom integration 'eyeonwater' at custom_components/eyeonwater/coordinator.py, line 43: await meter.read_historical_data( (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please report it to the author of the 'eyeonwater' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in async_refresh await self._async_refresh(log_failures=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data return await self.update_method() File "/config/custom_components/eyeonwater/init.py", line 52, in async_update_data await eye_on_water_data.read_meters(days_to_load=3) File "/config/custom_components/eyeonwater/coordinator.py", line 43, in read_meters await meter.read_historical_data(dOn Oct 8, 2024, at 7:14 AM, Konstantin Deev @.***> wrote: @bsp9493 Thank you for the confirmation. The v2.5.12 has been released

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

bsp9493 commented 4 weeks ago

Need to reopen this one…

please see my previous post after upgrade to release version