custom-components / sensor.stadtreinigung_hamburg

Stadtreinigung Hamburg - get garbage collection dates in Hamburg - custom component for Home Assistant
MIT License
27 stars 6 forks source link

Error importing platform config_flow #20

Closed KlaraJa closed 3 weeks ago

KlaraJa commented 1 month ago

Version of the custom_component

1.1.3

Configuration


Not needed

Describe the bug

After upgrading HomeAssistant to 2024.10.0 the Integration does not start anymore and throws an error.

Debug log


Logger: homeassistant.config_entries
Source: config_entries.py:563
First occurred: 20:56:36 (2 occurrences)
Last logged: 22:11:29

Error importing platform config_flow from integration stadtreinigung_hamburg to set up stadtreinigung_hamburg configuration entry: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly.
NordFreak commented 1 month ago

Here the same:

Logger: homeassistant.config_entries Quelle: config_entries.py:563 Erstmals aufgetreten: 06:03:52 (2 Vorkommnisse) Zuletzt protokolliert: 12:49:22

Error importing platform config_flow from integration stadtreinigung_hamburg to set up stadtreinigung_hamburg configuration entry: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly.

murmelbahn commented 1 month ago

Yeah, I've the same error. Would be really nice if you can fix this.

quackelduck commented 1 month ago

Error here as well. Here are the error-protocols from my side:

Logger: py.warnings Quelle: custom_components/stadtreinigung_hamburg/config_flow.py:7 Integration: Stadtreinigung Hamburg ([Dokumentation](https://github.com/custom-> components/sensor.stadtreinigung_hamburg)) Erstmals aufgetreten: 21:02:10 (3 Vorkommnisse) Zuletzt protokolliert: 21:02:10

/usr/local/lib/python3.12/site-packages/pyppeteer/us_keyboard_layout.py:73: SyntaxWarning: invalid escape sequence '> (' 'Digit9': {'keyCode': 57, 'code': 'Digit9', 'shiftKey': '(', 'key': '9'}, /usr/local/lib/python3.12/site-packages/pyppeteer/us_keyboard_layout.py:143: SyntaxWarning: invalid escape sequence > '\<' 'Comma': {'keyCode': 188, 'code': 'Comma', 'shiftKey': '\<', 'key': ','}, /usr/local/lib/python3.12/site-packages/pyppeteer/us_keyboard_layout.py:247: SyntaxWarning: invalid escape sequence > '\<' '<': {'keyCode': 188, 'key': '\<', 'code': 'Comma'},

Logger:` homeassistant.config_entries Quelle: config_entries.py:563 Erstmals aufgetreten: 21:02:18 (1 Vorkommnisse) Zuletzt protokolliert: 21:02:18

Error importing platform config_flow from integration stadtreinigung_hamburg to set up stadtreinigung_hamburg > configuration entry: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or > lxml_html_clean directly.

Logger: homeassistant.util.loop Quelle: util/loop.py:77 Erstmals aufgetreten: 21:02:18 (2 Vorkommnisse) Zuletzt protokolliert: 21:02:18

Detected blocking call to import_module with args ('custom_components.stadtreinigung_hamburg.config_flow',) in /usr/src/homeassistant/homeassistant/loader.py, line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module 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 "/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 561, in async_setup await integration.async_get_platform("config_flow") File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform platforms = await self.async_get_platforms((platform_name,)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms platforms.update(self._load_platforms(platform_names)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms platform_name: self._load_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f6accbc50>, <Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>) in /usr/local/lib/python3.12/ssl.py, line 713: context.load_default_certs(purpose) inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs 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 "/usr/local/lib/python3.12/site-packages/gardena/smart_system.py", line 190, in start_ws await self.launch_websocket_loop(ws_url) File "/usr/local/lib/python3.12/site-packages/gardena/smart_system.py", line 227, in launch_websocket_loop websocket = await websockets.connect(url, ping_interval=150) File "/usr/local/lib/python3.12/site-packages/websockets/legacy/client.py", line 654, in __await_impl _transport, protocol = await self._create_connection() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1149, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1173, in _create_connection_transport transport = self._make_ssl_transport( File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 83, in _make_ssl_transport ssl_protocol = sslproto.SSLProtocol( File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 295, in init__ sslcontext = _create_transport_context( File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 55, in _create_transport_context sslcontext = ssl.create_default_context() File "/usr/local/lib/python3.12/ssl.py", line 713, in create_default_context context.load_default_certs(purpose)

quackelduck commented 1 month ago

Exactly the same here.

Error importing platform config_flow from integration stadtreinigung_hamburg to set up stadtreinigung_hamburg configuration entry: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly.

I would really appreciate a fix. Thanks so much!!

webmediart-github commented 1 month ago

Same with 2024.10.2

Logger: homeassistant.config_entries
Source: config_entries.py:563
First occurred: 21:05:58 (3 occurrences)
Last logged: 21:21:22

Error importing platform config_flow from integration stadtreinigung_hamburg to set up stadtreinigung_hamburg configuration entry: lxml.html.clean module is now a separate project lxml_html_clean. Install lxml[html_clean] or lxml_html_clean directly.
williknow commented 1 month ago

I am afraid the maintainer is not living in Hamburg anymore. Nothing going on here since last year. Is someone able to take over? Do we have to switch over to waste collection schedule?

Neunsen commented 1 month ago

The solution seems to be to insert a command to install lxml.html.clean separately. You can find the instructions if you Google the error message. Right now only the phyton3 package gets installed via scripts/setup, but lxml package is not inside anymore due to security issues. Unfortunately I have no clue how to deal with it. I only did some research. 🤣

pinnbert23 commented 1 month ago

you have to add a line ( "lxml_html_clean") to the manifest.json and restart HA! After that it works perfectly!

Here is the customized code for the manifest.json

{ "codeowners": [ "@vigonotion" ], "config_flow": true, "dependencies": [], "documentation": "https://github.com/custom-components/sensor.stadtreinigung_hamburg", "domain": "stadtreinigung_hamburg", "name": "City Cleaning Hamburg", "requirements": [ "city cleaning-hamburg==0.3.1", "lxml_html_clean" ], "version": "v1.1.3" }

quackelduck commented 1 month ago

Works like a charm, thanks!!

williknow commented 1 month ago

Thanks for the solution. Do we have some security issues now? I changed /homeassistant/custom_components/stadtreinigung_hamburg/manifest.json according to the post above. But now I get the error "Integration not found". Update 21.10. I switched to waste collection schedule. Also a very nice integration. I am afraid this and the 2 other issues here will never be closed.

NordFreak commented 1 month ago

@040medien

Hey thanks for your work! If I'm interpreting your nickname correctly, you're from Hamburg. Thanks for your support from Schnelsen. Since the bug took longer, I switched to Waste Collection.

Will you now take over the maintenance of the integration permanently? Or do I prefer to stay with Waste Collection?

pinnbert23 commented 1 month ago

Hello from Winterhude, we can happily continue this together. I think this addon is better than waste collection. Best regards

NordFreak @.***> schrieb am Fr., 25. Okt. 2024, 10:04:

@040medien https://github.com/040medien

Hey thanks for your work! If I'm interpreting your nickname correctly, you're from Hamburg. Thanks for your support from Schnelsen. Since the bug took longer, I switched to Waste Collection.

Will you now take over the maintenance of the integration permanently? Or do I prefer to stay with Waste Collection?

— Reply to this email directly, view it on GitHub https://github.com/custom-components/sensor.stadtreinigung_hamburg/issues/20#issuecomment-2437048123, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PJWUXG2U26DGNYA4RJ7UDZ5HUPJAVCNFSM6AAAAABPINJ6GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZXGA2DQMJSGM . You are receiving this because you commented.Message ID: <custom-components/sensor.stadtreinigung_hamburg/issues/20/2437048123@ github.com>

040medien commented 1 month ago

Hi @NordFreak , @pinnbert23. I only raised a simple PR, which got merged by @vigonotion - I presume he is and will continue to be the maintainer of this repository.

vigonotion commented 1 month ago

Hi, I just don't have the time to look at issues and fix them, but I will look at PRs and will release new versions as needed

pinnbert23 commented 1 month ago

So let us as citizens of Hamburg pay attention to our garbage application

Tom Schneider @.***> schrieb am Fr., 25. Okt. 2024, 20:17:

Hi, I just don't have the time to look at issues and fix them, but I will look at PRs and will release new versions as needed

— Reply to this email directly, view it on GitHub https://github.com/custom-components/sensor.stadtreinigung_hamburg/issues/20#issuecomment-2438384891, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PJWUR5ENX5FQY7FGG73C3Z5J4JVAVCNFSM6AAAAABPINJ6GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZYGM4DIOBZGE . You are receiving this because you were mentioned.Message ID: <custom-components/sensor.stadtreinigung_hamburg/issues/20/2438384891@ github.com>

MartinF-HH commented 3 weeks ago

Hi, let me start by thanking all of you to keep Stadtreinigung working.

I see the following warning in my log. Is that an issue that needs attention and if yes, would you be willing to look at it as well?

Logger: homeassistant.helpers.frame Source: helpers/frame.py:155 First occurred: 6:29:57 AM (1 occurrences) Last logged: 6:29:57 AM

Detected code that calls async_forward_entry_setup for integration stadtreinigung_hamburg with title: Frahm and entry_id: 01JAMRXZDMKXGKJ791F4MZ7W2T, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

040medien commented 3 weeks ago

@MartinF-HH I'm not an expert, bu this is a separate issue (and as per the error this means that in 3 months, this addon will stop working again). Please open a separate issue for this. Actually there is already https://github.com/custom-components/sensor.stadtreinigung_hamburg/issues/19

vigonotion commented 3 weeks ago

fixed in the latest release