-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Nest Integration failing #119223
Comments
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) nest documentation |
Hi, thank you for the report. |
the ... menu pull down doesn't have an entry for diagnostics download
…On Sun, Jun 9, 2024 at 5:52 PM Allen Porter ***@***.***> wrote:
Hi, thank you for the report.
Can you include the diagnostics information from
https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics
? This will download a json file you can attach to this issue. Thank you!
—
Reply to this email directly, view it on GitHub
<#119223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH4SZQIBO6PTVJJ2X2ZFQKLZGT2GLAVCNFSM6AAAAABJBB4AJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJWHE3TEMZQGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Dan Marotta
+1949.466.7611
*If this email isn't intended for you, please delete it. *
|
here's the trace back from loader ... Logger: homeassistant.loader Unexpected exception importing component homeassistant.components.nest |
OK I was trying to determine what was going on with the python environment here, or custom components. Makes sense the integration can't be loaded, so we can't get diagnostics. From what I can tell looking at other projects on github, it looks like this may happen with a newer version of python than is supported by home assistant. (example discussion) |
This is consistent with an issue that homeassistant's pinned version of pydantic (1.10.12) has with Python 3.12.4: pydantic/pydantic#9607. Pydantic Version 1.10.16 was released a couple of hours ago addressing this. |
Thanks I’ll upgrade itDan Marotta+1949.466.7611If this email isn't intended for you, please delete it.On Jun 11, 2024, at 2:08 PM, Jimmy Retzlaff ***@***.***> wrote:
This is consistent with an issue that homeassistant's pinned version of pydantic (1.10.12) has with Python 3.12.4: pydantic/pydantic#9607. Pydantic Version 1.10.16 was released a couple of hours ago addressing this.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Pydantic isn't in the stack trace above. Does it really address it? |
Oh, sorry - I conflated too many coincidences. I came here from a similar stack trace involving HACS that did contain Pydantic (the issue you linked above, @allenporter). This issue appears to be the same root cause, but it is triggered by Mashumaro instead of Pydantic (Python 3.12.4 changed a call signature in an internal utility that is called by both Pydantic and Mashumaro). A quick search of the Mashumaro project did not turn up an issue, so I created Fatal1ty/mashumaro#226. |
i upgraded to 1.10.16, however, same error ...
…On Tue, Jun 11, 2024 at 11:00 PM Jimmy Retzlaff ***@***.***> wrote:
Oh, sorry - I conflated too many coincidences. I came here from a similar
stack trace involving HACS that did contain Pydantic (the issue you linked
above, @allenporter <https://github.com/allenporter>). This issue appears
to be the same root cause, but it is triggered by Mashumaro instead of
Pydantic (Python 3.12.4 changed a call signature in an internal utility
that is called by both Pydantic and Mashumaro). A quick search of the
Mashumaro project did not turn up an issue, so I created
Fatal1ty/mashumaro#226 <Fatal1ty/mashumaro#226>.
—
Reply to this email directly, view it on GitHub
<#119223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH4SZQKFOMWYDJMRHCQAW7LZG7PXVAVCNFSM6AAAAABJBB4AJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRSGE3DONJTGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Dan Marotta
+1949.466.7611
*If this email isn't intended for you, please delete it. *
|
It is Mashumaro rather than Pydantic that's the issue affecting Nest, but it's the same root cause (see the comment you replied to). Mashumaro has not yet made a release to fix this. Homeassistant-core releases are staying pinned at Python 3.12.3 until these projects are fixed and incorporated: #119454. A workaround is to downgrade to Python 3.12.3 until things are fixed. |
A version which fix the issue has been released but it looks like Home Assistant core 2024.6.4 still does not make it installed. |
I've upgraded to the latest version of Mashumaro and nest integration works fine ... |
Which docker container version has this fixed in it? I use homeassistant/home-assistant:stable but the Nest integration has been broken for a while. This is your own container, you should be able to have it fixed. |
@ctenersight, I don't believe the stable docker container ever had this specific issue. This issue affects users with a homeassistant core installation, rather than a docker installation, who updated to Python 3.12.4 after its release on June 6 (any such installation is irrelevant if using a docker installation as the docker container has its own version of Python). If you don't see |
@ctenersight file a new issue and fill out the template and happy to take a look, not aware of any known breakages in docker container |
Upstream mashumaro v3.13.1 appears to have the fix for this. Anything further we need to track here? |
I haven't used Nest for a couple of years, I came here through the similar issues with HACS. So I can't verify that things are working (relative to this issue). But I'm confident that the new mashumaro fixes this - I manually patched it and pydantic in my venv to fix HACS and other extensions with the same issues and everything has been good. Also, the Nest integration was never the root cause, only a symptom of the root cause that's being tracked elsewhere. So I think it's fine to close this. |
Please be sure to leave a link to the issue being tracked elsewhere if you do close this here. Thanks! |
The fix for this is likely to pin something in |
@allenporter, I don't understand hass dependency specification / resolution at all. But, unlike pydantic (which has triggered the same issue for other integrations), I can't find anything here in hass core that calls for the installation of mashumaro. My best guess is that it's pulled in for the nest integration by python-google-nest-sdm/setup.cfg. If that's accurate, that's probably the place to update the pin to I'm way out of my depth here (long-time Python dev, but not a hass dev at all), so this could all be wrong. |
Fixed in #121782 and tagged for the next patch release either 2024.7.3 (looks like its pending, but i didn't check if it was cut already), or if it doesn't make that cut then 2024.7.4 |
can anybody confirm if this should be fixed with 2024.7.3 as I still observe same issue with 2024.7.3 version |
@K0enH your environment may be stuck on an older version -- perhaps from a custom component or home assistant isn't able to fix. You should ensure you have mashumaro>=3.13.1 |
I've updated to 2024.7.3 also and I can confirm that I still only appear to have So was something in 2024.7.3 supposed to specifically bump this to be I'm seeing here that
|
I just retried an update and validated the logs: based on this I also dont see any validation on mashumaro dependency. |
pip3 freeze - local > requirements.txt gives |
I should have been more clear: you need to upgrade to mashumaro>=3.13.1 yourself as home assistant may not be able to fix it. This is what i meant by "you should ensure you have mashumaro>=3.13.1". This pin is set in core/homeassistant/requirements.py Line 24 in 42b9c04
This is down side of using core since you manage you own python environment. |
On my machine, this dependency is in |
in my setup with core the mentioned folder is emtpy, however I managed to get it back working by navigating to the environment and than run pip install mashumaro --upgrade afterward restarted home assistant and all back to normal again
|
The problem
The Nest integration is failing with 2024.6.1 or 6.2
What version of Home Assistant Core has the issue?
core-2024.6.1
What was the last working version of Home Assistant Core?
core-2024.5.x
What type of installation are you running?
Home Assistant Core
Integration causing the issue
https://www.home-assistant.io/integrations/nest/
Link to integration documentation on our website
No response
Diagnostics information
Logger: homeassistant.setup
Source: setup.py:320
First occurred: 10:21:39 AM (1 occurrences)
Last logged: 10:21:39 AM
Setup failed for 'nest': Unable to import component: Exception importing homeassistant.components.nest
Traceback (most recent call last):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/components/nest/init.py", line 12, in
from google_nest_sdm.camera_traits import CameraClipPreviewTrait
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/google_nest_sdm/camera_traits.py", line 17, in
from .event import (
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/google_nest_sdm/event.py", line 369, in
class EventMessage(DataClassDictMixin):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/mixins/dict.py", line 24, in init_subclass
compile_mixin_unpacker(cls, **builder_params["unpacker"])
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/mixin.py", line 49, in compile_mixin_unpacker
builder.add_unpack_method()
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 557, in add_unpack_method
self._add_unpack_method_lines(method_name)
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 462, in _add_unpack_method_lines
).build(
^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 1276, in build
unpacked_value = UnpackerRegistry.get(
^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/common.py", line 238, in get
expr = packer(spec)
^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 711, in unpack_special_typing_primitive
uv = UnpackerRegistry.get(spec.copy(type=arg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/common.py", line 238, in get
expr = packer(spec)
^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 553, in unpack_type_with_overridden_deserialization
deserialization_method = get_overridden_deserialization_method(spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 539, in get_overridden_deserialization_method
_unpack_with_annotated_serialization_strategy(
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 506, in _unpack_with_annotated_serialization_strategy
value_type = spec.builder.evaluate_forward_ref(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 339, in evaluate_forward_ref
return evaluate_forward_ref(typ, globalns, self.dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/helpers.py", line 769, in evaluate_forward_ref
return typ._evaluate(
^^^^^^^^^^^^^^
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 992, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1063, in _get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing homeassistant.components.nest
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1052, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/util/loop.py", line 131, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/components/nest/init.py", line 12, in
from google_nest_sdm.camera_traits import CameraClipPreviewTrait
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/google_nest_sdm/camera_traits.py", line 17, in
from .event import (
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/google_nest_sdm/event.py", line 369, in
class EventMessage(DataClassDictMixin):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/mixins/dict.py", line 24, in init_subclass
compile_mixin_unpacker(cls, **builder_params["unpacker"])
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/mixin.py", line 49, in compile_mixin_unpacker
builder.add_unpack_method()
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 557, in add_unpack_method
self._add_unpack_method_lines(method_name)
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 462, in _add_unpack_method_lines
).build(
^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 1276, in build
unpacked_value = UnpackerRegistry.get(
^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/common.py", line 238, in get
expr = packer(spec)
^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 711, in unpack_special_typing_primitive
uv = UnpackerRegistry.get(spec.copy(type=arg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/common.py", line 238, in get
expr = packer(spec)
^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 553, in unpack_type_with_overridden_deserialization
deserialization_method = get_overridden_deserialization_method(spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 539, in get_overridden_deserialization_method
_unpack_with_annotated_serialization_strategy(
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/types/unpack.py", line 506, in _unpack_with_annotated_serialization_strategy
value_type = spec.builder.evaluate_forward_ref(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/code/builder.py", line 339, in evaluate_forward_ref
return evaluate_forward_ref(typ, globalns, self.dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/mashumaro/core/meta/helpers.py", line 769, in evaluate_forward_ref
return typ._evaluate(
^^^^^^^^^^^^^^
TypeError: ForwardRef._evaluate() missing 1 required keyword-only argument: 'recursive_guard'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/setup.py", line 320, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1012, in async_get_component
self._component_future.result()
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1004, in async_get_component
comp = self._get_component()
^^^^^^^^^^^^^^^^^^^^^
File "/srv/homeassistant_3.12/lib/python3.12/site-packages/homeassistant/loader.py", line 1063, in _get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing homeassistant.components.nest
Example YAML snippet
N/A
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: