Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detected blocking call to open with args ('/config/packet.log', 'a') #217

Open
donaldwpage opened this issue Dec 5, 2024 · 1 comment
Open

Comments

@donaldwpage
Copy link

donaldwpage commented Dec 5, 2024

Describe the bug
A clear and concise description of what the bug is.
Home Assistant system log reports blocking call in ramses_cc

To Reproduce
Steps to reproduce the behaviour (for example):
Install HACS
Install ramses_rf 0.50.0

Expected behavior
A clear and concise description of what you expected to happen.

Please complete the following information:

  • ramses_cc: section from configuration.yaml
  • section is empty
  • contemporaneous portion of the home-assistant.log
  • contemporaneous portion of the packet.log
> Logger: homeassistant.util.loop
> Source: util/loop.py:136
> First occurred: 21:00:53 (1 occurrences)
> Last logged: 21:00:53
> 
> Detected blocking call to open with args ('/config/packet.log', 'a') inside the event loop by custom integration 'ramses_cc' at custom_components/ramses_cc/broker.py, line 146: await self.client.start(cached_packets=cached_packets()) (offender: /usr/local/lib/python3.13/logging/__init__.py, line 1247: return open_func(self.baseFilename, self.mode,), please create a bug report at https://github.com/zxdavb/ramses_cc/issues 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 
File "<frozen runpy>", line 88, in _run_code 
File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module> 
 sys.exit(main()) 
File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main 
 exit_code = runner.run(runtime_conf) 
File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
 return loop.run_until_complete(setup_and_run_hass(runtime_config)) 
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 708, in run_until_complete
 self.run_forever() 
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 679, in run_forever
 self._run_once() 
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2027, in _run_once
 handle._run() 
File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
 self._context.run(self._callback, *self._args) 
File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component
 result = await _async_setup_component(hass, domain, config) 
File "/usr/src/homeassistant/homeassistant/setup.py", line 461, in _async_setup_component
 await asyncio.gather( 
File "/usr/src/homeassistant/homeassistant/setup.py", line 463, in <genexpr>
 create_eager_task( 
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
 return Task(coro, loop=loop, name=name, eager_start=True) 
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 788, in async_setup_locked
 await self.async_setup(hass, integration=integration) 
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
 await self.__async_setup_with_context(hass, integration) 
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
 result = await component.async_setup_entry(hass, self) 
File "/config/custom_components/ramses_cc/__init__.py", line 94, in async_setup_entry
 await broker.async_setup() 
File "/config/custom_components/ramses_cc/broker.py", line 146, in async_setup
 await self.client.start(cached_packets=cached_packets())

Additional context
Add any other context about the problem here, such as the make/model of your hardware.
evofw3 atmega32u4 - /dev/serial/by-id/usb-SparkFun_evofw3_atmega32u4-if00, s/n: n/a - SparkFun - 1B4F:9206

gateway_config

disable_discovery: false
disable_qos: false
disable_sending: false
enable_eavesdrop: false

schema:
"01:108199": {}

known_device_ids:
"01:108199": {}
"02:022960": {}
"04:024890": {}
"04:049506": {}
"04:112432": {}
"04:123648": {}
"04:123650": {}
"04:123652": {}
"04:123654": {}
"04:125369": {}
"04:246790": {}
"07:030355": {}
"13:142019": {}
"13:181949": {}
"18:069148":
  alias: evofw3
  class: HGI
"34:007977": {}
"34:009973": {}
@zxdavb zxdavb changed the title Detected blocking call to open with args ('/config/packet.log', 'a') inside the event loop by custom integration 'ramses_cc' Detected blocking call to open with args ('/config/packet.log', 'a') inside the event loop Dec 8, 2024
@zxdavb zxdavb changed the title Detected blocking call to open with args ('/config/packet.log', 'a') inside the event loop Detected blocking call to open with args ('/config/packet.log', 'a') Dec 8, 2024
@zxdavb
Copy link
Owner

zxdavb commented Dec 8, 2024

Same design fault as #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants