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 #1371

Open
filmackay opened this issue Oct 25, 2024 · 1 comment
Open

Detected blocking call to open #1371

filmackay opened this issue Oct 25, 2024 · 1 comment

Comments

@filmackay
Copy link

Running on HA 2014.10.3 I get the following report, that I was asked to log :)

2024-10-23 07:29:14.407 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/ocpp/v16/schemas/GetConfiguration.json', 'r') inside the event loop by custom integration 'ocpp' at custom_components/ocpp/api.py, line 599: resp = await self.call(req) (offender: /usr/local/lib/python3.12/site-packages/ocpp/messages.py, line 164: with open(path, "r", encoding="utf-8-sig") as f:), please create a bug report at https://github.com/lbbrhzn/ocpp/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 223, in <module>
    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 "/config/custom_components/ocpp/api.py", line 465, in post_connect
    await self.get_supported_features()
  File "/config/custom_components/ocpp/api.py", line 599, in get_supported_features
    resp = await self.call(req)
@scauwe
Copy link

scauwe commented Dec 13, 2024

I get the same error when rebooting Home Assistant (
After this, the plugin just seems to connect.

2024-12-14 00:32:28.702 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/usr/local/lib/python3.12/site-packages/ocpp/v16/schemas/GetConfiguration.json', 'r') inside the event loop by custom integration 'ocpp' at custom_components/ocpp/ocppv16.py, line 212: resp = await self.call(req) (offender: /usr/local/lib/python3.12/site-packages/ocpp/messages.py, line 164: with open(path, "r", encoding="utf-8-sig") as f:), please create a bug report at https://github.com/lbbrhzn/ocpp/issues
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 "/config/custom_components/ocpp/chargepoint.py", line 332, in post_connect
await self.fetch_supported_features()
File "/config/custom_components/ocpp/chargepoint.py", line 266, in fetch_supported_features
self._attr_supported_features = await self.get_supported_features()
File "/config/custom_components/ocpp/ocppv16.py", line 212, in get_supported_features
resp = await self.call(req)

Versions:
Core: 2024.11.3
Supervisor: 2024.11.4
Operating System: 13.2
Frontend: 20241106.2
OCPP: v0.6.1

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