ha-google-home: Integration doesn't load

Describe the bug

Integration doesn’t load

Version of the integration

1.50

Logs

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/google_home/api.py:10
Integration: Google Home (documentation, issues)
First occurred: 14:47:51 (1 occurrences)
Last logged: 14:47:51

Setup failed for google_home: unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 201, in _async_setup_component
    component = integration.get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 490, in get_component
    cache[self.domain] = importlib.import_module(self.pkg_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 855, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/google_home/__init__.py", line 19, in <module>
    from .api import GlocaltokensApiClient
  File "/config/custom_components/google_home/api.py", line 10, in <module>
    from glocaltokens.client import Device, GLocalAuthenticationTokens
  File "/usr/local/lib/python3.9/site-packages/glocaltokens/client.py", line 23, in <module>
    from .google.internal.home.foyer.v1_pb2 import GetHomeGraphRequest, GetHomeGraphResponse
  File "/usr/local/lib/python3.9/site-packages/glocaltokens/google/internal/home/foyer/v1_pb2.py", line 22, in <module>
    create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 47 (2 by maintainers)

Most upvoted comments

@KapJI Telling me about pipdeptree helped me solve it. Scrolling through and searching for protobuf lead me to the integration “GTFS-RT” which I installed through HACS. Once I removed that, @leikoilja’s integration here was able to start up.

The only weird thing now is that the alarms and timers sensor.* entities were only created for one of the Google Mini’s I have around my home. Four of them are in speaker pairs, but in that fresh VM I did that endless testing mentioned in past comments, the integration added those extra entities for the pairs. I don’t know why it didn’t this time, however, it would guess that it’s most likely a different issue. I’ll delete the integration and re add it a few times, with some rebooting to see what happens, and perhaps open another ticket.

Thanks so much for all your help on a problem that wasn’t actually related to this item. Especially for somebody who doesn’t know much (if anything) about python.

Maybe the issue comes when first installing the integration on a clean 2021.7 installation, and if it was installed before doesn’t cause any issues. This should be discussed and followed at #288 as @DurgNomis-drol has stated.