cyberjunky / home-assistant-garmin_connect

The Garmin Connect integration allows you to expose data from Garmin Connect to Home Assistant.
MIT License
238 stars 34 forks source link

Getting "Unexpected exception importing component custom_components.garmin_connect" after 9.3 update #105

Closed merc4derp closed 1 year ago

merc4derp commented 1 year ago

2 errors in the log, here's the tracebacks:

`Logger: homeassistant.setup Source: loader.py:826 First occurred: 14:43:02 (1 occurrences) Last logged: 14:43:02

Setup failed for custom integration garmin_connect: Unable to import component: Exception importing custom_components.garmin_connect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 818, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/garmin_connect/init.py", line 8, in from garminconnect import ( File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 9, in import garth File "/usr/local/lib/python3.11/site-packages/garth/init.py", line 1, in from .data import HRVData, SleepData File "/usr/local/lib/python3.11/site-packages/garth/data/init.py", line 3, in from .hrv import HRVData File "/usr/local/lib/python3.11/site-packages/garth/data/hrv.py", line 6, in from .. import http File "/usr/local/lib/python3.11/site-packages/garth/http.py", line 10, in from . import sso File "/usr/local/lib/python3.11/site-packages/garth/sso.py", line 11, in from .auth_tokens import OAuth1Token, OAuth2Token File "/usr/local/lib/python3.11/site-packages/garth/auth_tokens.py", line 8, in @dataclass ^^^^^^^^^ File "pydantic/dataclasses.py", line 231, in pydantic.dataclasses.dataclass File "pydantic/dataclasses.py", line 224, in pydantic.dataclasses.dataclass.wrap File "pydantic/dataclasses.py", line 347, in pydantic.dataclasses._add_pydantic_validation_attributes File "pydantic/dataclasses.py", line 400, in pydantic.dataclasses.create_pydantic_model_from_dataclass File "pydantic/main.py", line 1026, in pydantic.main.create_model File "pydantic/main.py", line 186, in pydantic.main.ModelMetaclass.new TypeError: Argument 'bases' has incorrect type (expected list, got tuple)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component component = integration.get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 826, in get_component raise ImportError(f"Exception importing {self.pkg_path}") from err ImportError: Exception importing custom_components.garmin_connect This error originated from a custom integration.

Logger: homeassistant.loader Source: custom_components/garmin_connect/init.py:8 Integration: garmin_connect (documentation, issues) First occurred: 14:43:02 (1 occurrences) Last logged: 14:43:02

Unexpected exception importing component custom_components.garmin_connect Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 818, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/garmin_connect/init.py", line 8, in from garminconnect import ( File "/usr/local/lib/python3.11/site-packages/garminconnect/init.py", line 9, in import garth File "/usr/local/lib/python3.11/site-packages/garth/init.py", line 1, in from .data import HRVData, SleepData File "/usr/local/lib/python3.11/site-packages/garth/data/init.py", line 3, in from .hrv import HRVData File "/usr/local/lib/python3.11/site-packages/garth/data/hrv.py", line 6, in from .. import http File "/usr/local/lib/python3.11/site-packages/garth/http.py", line 10, in from . import sso File "/usr/local/lib/python3.11/site-packages/garth/sso.py", line 11, in from .auth_tokens import OAuth1Token, OAuth2Token File "/usr/local/lib/python3.11/site-packages/garth/auth_tokens.py", line 8, in @dataclass ^^^^^^^^^ File "pydantic/dataclasses.py", line 231, in pydantic.dataclasses.dataclass File "pydantic/dataclasses.py", line 224, in pydantic.dataclasses.dataclass.wrap File "pydantic/dataclasses.py", line 347, in pydantic.dataclasses._add_pydantic_validation_attributes File "pydantic/dataclasses.py", line 400, in pydantic.dataclasses.create_pydantic_model_from_dataclass File "pydantic/main.py", line 1026, in pydantic.main.create_model File "pydantic/main.py", line 186, in pydantic.main.ModelMetaclass.new TypeError: Argument 'bases' has incorrect type (expected list, got tuple) `

geertmeersman commented 1 year ago

+1

cyberjunky commented 1 year ago

Which other integrations do you have installed? It looks like a conflict between two or more

geertmeersman commented 1 year ago

I think it's linked to sth that upgraded in the 2023.9.3, quite some other integrations also seem to have the same issue. Suppose it will be solved soon globally

merc4derp commented 1 year ago

Which other integrations do you have installed? It looks like a conflict between two or more

From hacs only this and localtuya. Everything else is official and nothing too exotic.

geertmeersman commented 1 year ago

Errors gone in the 2023.10.0

merc4derp commented 1 year ago

Can confirm, no more errors after today's update. Closing this.