thomasloven / hass-fontawesome

🔹 Use icons from fontawesome in home-assistant
Other
274 stars 52 forks source link

Detected blocking call to walk with args .... #88

Open Just-Zuul opened 1 month ago

Just-Zuul commented 1 month ago

Some Days after update to HA 2024.7.4

Logger: homeassistant.util.loop Quelle: util/loop.py:136 Erstmals aufgetreten: 11:25:58 (2 Vorkommnisse) Zuletzt protokolliert: 11:25:58

Detected blocking call to walk with args ('/config/custom_components/fontawesome/data/brands',) inside the event loop by custom integration 'fontawesome' at custom_components/fontawesome/init.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath): (offender: /config/custom_components/fontawesome/init.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath):), please report it to the author of the 'fontawesome' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#walk 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 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/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, *request.match_info) File "/config/custom_components/fontawesome/init.py", line 39, in get for (dirpath, dirnames, filenames) in walk(self.iconpath): Detected blocking call to scandir with args ('/config/custom_components/fontawesome/data/brands',) inside the event loop by custom integration 'fontawesome' at custom_components/fontawesome/init.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath): (offender: , line 366: ?), please report it to the author of the 'fontawesome' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir 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 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/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/config/custom_components/fontawesome/init.py", line 39, in get for (dirpath, dirnames, filenames) in walk(self.iconpath):

kaizersoje commented 2 weeks ago

I am seeing this in the logs

024-08-29 19:25:50.746 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'fontawesome' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/fontawesome/main.js", "/config/custom_components/fontawesome/main.js", True)])`; This function will be removed in 2025.7 at custom_components/fontawesome/__init__.py, line 50: hass.http.register_static_path(, please report it to the author of the 'fontawesome' custom integration
2024-08-29 19:25:50.755 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'fontawesome' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/fontawesome/icons/brands", "/config/custom_components/fontawesome/data/brands", True)])`; This function will be removed in 2025.7 at custom_components/fontawesome/__init__.py, line 58: hass.http.register_static_path(, please report it to the author of the 'fontawesome' custom integration
2024-08-29 19:25:50.783 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'fontawesome' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/fontawesome/icons/pro", "/config/custom_icons", True)])`; This function will be removed in 2025.7 at custom_components/fontawesome/__init__.py, line 69: hass.http.register_static_path(, please report it to the author of the 'fontawesome' custom integration
2024-08-29 19:31:55.841 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to walk with args ('/config/custom_components/fontawesome/data/brands',) inside the event loop by custom integration 'fontawesome' at custom_components/fontawesome/__init__.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath): (offender: /config/custom_components/fontawesome/__init__.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath):), please report it to the author of the 'fontawesome' custom integration
File "/config/custom_components/fontawesome/__init__.py", line 39, in get
2024-08-29 19:31:55.855 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args ('/config/custom_components/fontawesome/data/brands',) inside the event loop by custom integration 'fontawesome' at custom_components/fontawesome/__init__.py, line 39: for (dirpath, dirnames, filenames) in walk(self.iconpath): (offender: <frozen os>, line 366: ?), please report it to the author of the 'fontawesome' custom integration
File "/config/custom_components/fontawesome/__init__.py", line 39, in get