lbbrhzn / ocpp

Home Assistant integration for electric vehicle chargers that support the Open Charge Point Protocol (OCPP).
MIT License
206 stars 64 forks source link

ocpp - Detected blocking call to open #1220

Closed StefanoGiu closed 1 month ago

StefanoGiu commented 1 month ago

Since I upgraded to Home Assistant 2024.6.3:

2024-06-25 15:29:41.290 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('XXX/.homeassistant/deps/Python312/site-packages/ocpp/v16/schemas/GetConfiguration.json', 'r') in XXX.homeassistant\deps\Python312\site-packages\ocpp\messages.py, line 164: with open(path, "r", encoding="utf-8-sig") as f: inside the event loop Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "ZZZ\Python\Python312\Lib\site-packages\homeassistant_main.py", line 223, in sys.exit(main()) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant_main.py", line 209, in main exit_code = runner.run(runtime_conf) File "ZZZ\Python\Python312\Lib\site-packages\homeassistant\runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 672, in run_until_complete self.run_forever() File "ZZZ\Python\Python312\Lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 639, in run_forever self._run_once() File "ZZZ\Python\Python312\Lib\asyncio\base_events.py", line 1985, in _run_once handle._run() File "ZZZ\Python\Python312\Lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) File "XXX.homeassistant\custom_components\ocpp\api.py", line 459, in post_connect await self.get_supported_features() File "XXX.homeassistant\custom_components\ocpp\api.py", line 571, in get_supported_features resp = await self.call(req) File "XXX.homeassistant\deps\Python312\site-packages\ocpp\charge_point.py", line 399, in call validate_payload(call, self._ocpp_version) File "XXX.homeassistant\deps\Python312\site-packages\ocpp\messages.py", line 217, in validate_payload validator = get_validator( File "XXX.homeassistant\deps\Python312\site-packages\ocpp\messages.py", line 164, in get_validator with open(path, "r", encoding="utf-8-sig") as f:

It was working on HA 2024.4.0

drc38 commented 1 month ago

Duplicate, see #1199