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

Installing the grocy custom component in version 2025.1.0 leads to error on startup in HA 2024.12.5 #321

Open
saschaludwig opened this issue Jan 5, 2025 · 14 comments

Comments

@saschaludwig
Copy link

Describe the bug
Installing the grocy custom component in version 2025.1.0 leads to error on startup in HA 2024.12.5

Expected behavior
component should start normally

To Reproduce
Steps to reproduce the behavior:

  1. update to component version 2025.1.0
  2. restart HA
  3. See error

What is your installed versions of Home Assistant, Grocy and this integration?
HA 2024.12.5
Grocy Component 2025.1.0
Grocy 4.3.0

How do you have Grocy installed? Add-on or external?
external

Have you added debugging to the log, and what does the log say?


Logger: homeassistant.setup
Quelle: setup.py:269
Erstmals aufgetreten: 21:52:17 (1 Vorkommnisse)
Zuletzt protokolliert: 21:52:17

Setup failed for custom integration 'grocy': Requirements for grocy not found: ['pygrocy2==2.3.3'].

Logger: homeassistant.util.package
Quelle: util/package.py:152
Erstmals aufgetreten: 21:52:14 (3 Vorkommnisse)
Zuletzt protokolliert: 21:52:17

Unable to install package pygrocy2==2.3.3: × No solution found when resolving dependencies: ╰─▶ Because pygrocy2==2.3.3 depends on pydantic>=2.10.4,<2.11.dev0 and pydantic==1.10.19, we can conclude that pygrocy2==2.3.3 cannot be used. And because you require pygrocy2==2.3.3, we can conclude that your requirements are unsatisfiable.

@disconn3ct
Copy link

Downgrading in HACS seems to be working.

@saschaludwig
Copy link
Author

Downgrading in HACS seems to be working.

Yes, downgrade works.
The component wants to upgrade, even though it seems to be incompatible with the HA version even though it should be compatible according to:

https://github.com/custom-components/grocy/blob/52b736cd563a07692c1ec49617a2fa82c3814e24/hacs.json#L6C3-L6C32

@andyvandesand
Copy link

Just updated to the latest version, after also encountering this error. However now I get "Only a single configuration of Grocy is allowed." when trying to install the integration. HACS installation works fine. I have uninstalled/re-installed via HACS multiple times, uninstalling gives me "The Grocy custom component integration is configured or ignored. You need to delete the configuration for it before removing it from HACS.", but no grocy integration is visible in HASS. How can I remove it properly to then re-install?

@barrelltitor
Copy link

Just updated to the latest version, after also encountering this error. However now I get "Only a single configuration of Grocy is allowed." when trying to install the integration. HACS installation works fine. I have uninstalled/re-installed via HACS multiple times, uninstalling gives me "The Grocy custom component integration is configured or ignored. You need to delete the configuration for it before removing it from HACS.", but no grocy integration is visible in HASS. How can I remove it properly to then re-install?

Do you maybe have something in your config yaml?

Has anyone tried to maybe not pin a pygrocy2 version and just put pygrocy2? I'm not sure if that actually works in HA, don't have time to test myself right now.

@andyvandesand
Copy link

Nah, I haven't added anything in files. I have checked all the obvious yaml files as well, but found nothing.

@Tmatz27
Copy link

Tmatz27 commented Jan 8, 2025

Im having a similar issue. I tried to downgrade but i get error logs and it still doesnt work.

@cliffordwhansen
Copy link
Contributor

Please test again there was a PR #323 which should fix this issue

Grocy Component Version: 2025.1.1

@Tmatz27
Copy link

Tmatz27 commented Jan 9, 2025

Installed and can confirm this fixed my issue.

@andyvandesand
Copy link

andyvandesand commented Jan 10, 2025

still no joy for me unfortunately, same errors. Uninstalling via HACS gives me the error advising me I should remove the integration first with a link to the integrations but no grocy visible, and trying to add the integrations says only one configuration is possible. Can I manually remove this?
EDIT: There's nothing in the logs by the way.

@andyvandesand
Copy link

Managed to remove it by editing the .storage/core.config_entries file manually and removing the old entry. Once that was done I've been able to re-install it fine.
Not sure if this was a but with HASS, HACS or this integration, but this worked for me.

@MrAlucardDante
Copy link

The issue is unfortunately still present in 2025.1.1

Unable to install package pygrocy2==2.4.0: × No solution found when resolving dependencies: ╰─▶ Because pygrocy2==2.4.0 depends on pydantic>=2.10.4,<2.11.dev0 and pydantic==1.10.19, we can conclude that pygrocy2==2.4.0 cannot be used. And because you require pygrocy2==2.4.0, we can conclude that your requirements are unsatisfiable.

@ajp109
Copy link

ajp109 commented Jan 15, 2025

Same dependency problem here with HA 2025.1.2 and any version of the Grocy integration.

@mogorman
Copy link

mogorman commented Jan 17, 2025

im on HA 2025.1.2 and when i try to add latest version via add integration button i get

Jan 17 11:26:36 bob homeassistant[3075780]: 2025-01-17 11:26:36.021 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('custom_components.grocy.config_flow',) inside the event loop by integration 'config' at homeassistant/components/config/config_entries.py, line 179: return await super()._post_impl(request, data) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1304: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+config%22
Jan 17 11:26:36 bob homeassistant[3075780]: For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Jan 17 11:26:36 bob homeassistant[3075780]: Traceback (most recent call last):
Jan 17 11:26:36 bob homeassistant[3075780]:   File "<frozen runpy>", line 198, in _run_module_as_main
Jan 17 11:26:36 bob homeassistant[3075780]:   File "<frozen runpy>", line 88, in _run_code
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
Jan 17 11:26:36 bob homeassistant[3075780]:     sys.exit(main())
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
Jan 17 11:26:36 bob homeassistant[3075780]:     exit_code = runner.run(runtime_conf)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
Jan 17 11:26:36 bob homeassistant[3075780]:     return loop.run_until_complete(setup_and_run_hass(runtime_config))
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete
Jan 17 11:26:36 bob homeassistant[3075780]:     self.run_forever()
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever
Jan 17 11:26:36 bob homeassistant[3075780]:     self._run_once()
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once
Jan 17 11:26:36 bob homeassistant[3075780]:     handle._run()
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
Jan 17 11:26:36 bob homeassistant[3075780]:     self._context.run(self._callback, *self._args)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/config/deps/aiohttp/web_protocol.py", line 480, in _handle_request
Jan 17 11:26:36 bob homeassistant[3075780]:     resp = await request_handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/config/deps/aiohttp/web_app.py", line 569, in _handle
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/config/deps/aiohttp/web_middlewares.py", line 117, in impl
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     return await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
Jan 17 11:26:36 bob homeassistant[3075780]:     response = await handler(request)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
Jan 17 11:26:36 bob homeassistant[3075780]:     result = await handler(request, **request.match_info)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
Jan 17 11:26:36 bob homeassistant[3075780]:     return await func(self, request, *args, **kwargs)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
Jan 17 11:26:36 bob homeassistant[3075780]:     return await method(view, request, data, *args, **kwargs)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 172, in post
Jan 17 11:26:36 bob homeassistant[3075780]:     return await self._post_impl(request, data)
Jan 17 11:26:36 bob homeassistant[3075780]:   File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 179, in _post_impl
Jan 17 11:26:36 bob homeassistant[3075780]:     return await super()._post_impl(request, data)
Jan 17 11:26:36 bob homeassistant[3075780]: 
Jan 17 11:26:36 bob homeassistant[3075780]: 2025-01-17 11:26:36.025 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration grocy: cannot import name 'field_validator' from 'pydantic' (/config/deps/pydantic/__init__.py)

@mogorman
Copy link

clearing out my /config/deps and restarting resolved issue for me

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

9 participants