StephanJoubert / home_assistant_solarman

Home Assistant component for Solarman collectors used with a variety of inverters.
Apache License 2.0
507 stars 191 forks source link

Detected blocking call to open inside the event loop by custom integration 'solarman' at custom_components/solarman/solarman.py #597

Open bert1111 opened 3 weeks ago

bert1111 commented 3 weeks ago

Since latest HA update. Detected blocking call to open inside the event loop by custom integration 'solarman' at custom_components/solarman/solarman.py, line 33: with open(self.path + self.lookup_file) as f: (offender: /config/custom_components/solarman/solarman.py, line 33: with open(self.path + self.lookup_file) as f:), please create a bug report at https://github.com/StephanJoubert/home_assistant_solarman/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, 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/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/solarman/init.py", line 18, in async_setup_entry await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2032, in async_forward_entry_setups await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2034, in create_eagertask( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 134, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/solarman/sensor.py", line 79, in async_setup_entry _do_setup_platform(hass, entry.options, async_add_entities) File "/config/custom_components/solarman/sensor.py", line 51, in _do_setup_platform inverter = Inverter(path, inverter_sn, inverter_host, inverter_port, inverter_mb_slaveid, lookup_file) File "/config/custom_components/solarman/solarman.py", line 33, in init with open(self.path + self.lookup_file) as f:

nils512 commented 3 weeks ago

I see the same issue. just installed it today. HA-Version 2024.6.0 Solarman 1.5.1

Bikervossibaer commented 2 weeks ago

I see the same issue I have installed it today

Core 2024.6.1 Supervisor 2024.06.0 Operating System 12.3 Frontend 20240605.0

Detected blocking call to open inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/sensor.py, line 450: timezone = pytz.timezone( (offender: /usr/local/lib/python3.12/site-packages/pytz/init.py, line 108: return open(filename, 'rb')), please create a bug report at https://github.com/alandtse/alexa_media_player/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, 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/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 134, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in _async_setup_platform awaitable = create_eagertask(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/alexa_media/sensor.py", line 162, in async_setup_entry return await async_setup_platform( File "/config/custom_components/alexa_media/sensor.py", line 151, in async_setup_platform return await add_devices( File "/config/custom_components/alexa_media/helpers.py", line 52, in add_devices add_devices_callback(devices, False) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 515, in _async_schedule_add_entities_for_entry task = self.config_entry.async_create_task( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1134, in async_create_task task = hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 828, in async_create_task_internal task = create_eagertask(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 649, in async_add_entities await add_func(coros, entities, timeout) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 600, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 914, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1354, in add_to_platform_finish await self.async_added_to_hass() File "/config/custom_components/alexa_media/sensor.py", line 541, in async_added_to_hass self._process_raw_notifications() File "/config/custom_components/alexa_media/sensor.py", line 382, in _process_raw_notifications list(map(self._fix_alarm_date_time, self._n_dict.items())) File "/config/custom_components/alexa_media/sensor.py", line 450, in _fix_alarm_date_time timezone = pytz.timezone( Detected blocking call to open inside the event loop by custom integration 'watchman' at custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")): (offender: /config/custom_components/watchman/utils.py, line 258: for i, line in enumerate(open(yaml_file, encoding="utf-8")):), please create a bug report at https://github.com/dummylabs/thewatchman/issues 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 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, 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/runner.py", line 166, in setup_and_run_hass return await hass.async_run() File "/usr/src/homeassistant/homeassistant/core.py", line 515, in async_run await self.async_start() File "/usr/src/homeassistant/homeassistant/core.py", line 568, in async_start self.bus.async_fire_internal(EVENT_HOMEASSISTANT_STARTED) File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal self._hass.async_run_hass_job(job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/core.py", line 1418, in call self.hass.async_run_hass_job(self.listener_job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 939, in async_run_hass_job return self._async_add_hass_job(hassjob, args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 748, in _async_add_hass_job task = create_eagertask( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/watchman/init.py", line 274, in async_on_home_assistant_started parse_config(hass, reason="HA restart") File "/config/custom_components/watchman/init.py", line 351, in parse_config entity_list, service_list, files_parsed, files_ignored = parse( File "/config/custom_components/watchman/utils.py", line 258, in parse for i, line in enumerate(open(yaml_file, encoding="utf-8")):

Skilsoe commented 2 weeks ago

Have installed today and see same issue

coserotondo commented 1 week ago

Same for me

raysmith844 commented 1 week ago

Same for me as well

mrboogiee commented 6 days ago

following, experiencing the same issue

essera commented 1 day ago

Hi - same issue to me. i wrok with dwain Dashboard more than 1 year. The issue will start for more than 4 month ago.