Skip to content

Nest integration fails to load first time in a new venv #55883

Closed
@jretz

Description

@jretz

The problem

When recreating the Home Assistant Core venv to pickup new versions of hass, the Nest integration fails to load on the first run. It works fine on subsequent invocations of hass until the venv is recreated.

What is version of Home Assistant Core has the issue?

core-2021.9.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Nest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nest/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-09-06 19:19:08 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 9357e34937c1a2f1abc1b9a699908ed44b1ef2724fd68c87bdb254218848a307 from 127.0.0.1
2021-09-06 19:19:21 ERROR (MainThread) [homeassistant.setup] Setup failed for nest: unknown error
Traceback (most recent call last):
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/homeassistant/setup.py", line 207, in _async_setup_component
component = integration.get_component()
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/homeassistant/loader.py", line 516, in get_component
cache[self.domain] = importlib.import_module(self.pkg_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/homeassistant/components/nest/__init__.py", line 11, in <module>
from google_nest_sdm.google_nest_subscriber import GoogleNestSubscriber
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/google_nest_sdm/google_nest_subscriber.py", line 15, in <module>
from google.cloud import pubsub_v1
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/google/cloud/pubsub_v1/__init__.py", line 18, in <module>
from google.cloud.pubsub_v1 import publisher
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/google/cloud/pubsub_v1/publisher/__init__.py", line 17, in <module>
from google.cloud.pubsub_v1.publisher.client import Client
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/google/cloud/pubsub_v1/publisher/client.py", line 45, in <module>
__version__ = pkg_resources.get_distribution("google-cloud-pubsub").version
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 481, in get_distribution
dist = get_provider(dist)
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 357, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/mnt/mule/homeassistant/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'google-auth<2.0dev,>=1.25.0' distribution was not found and is required by google-api-core

Additional information

Adding google-nest-sdm to the new venv before starting hass for the first time prevents the issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions