DeebotUniverse / docs

https://deebot.readthedocs.io
GNU General Public License v3.0
33 stars 9 forks source link

Unable to install the integration #188

Closed Whytey closed 1 year ago

Whytey commented 1 year ago

After adding the integration through HACS, I get the following error as I add the integration to my install:

Config flow could not be loaded: Unknown error

Looking in the logs, I see two exceptions. A generic:

Logger: homeassistant.config_entries
Source: config_entries.py:809
First occurred: 3:48:45 PM (2 occurrences)
Last logged: 5:03:37 PM

Error occurred loading configuration flow for integration deebot: Exception importing custom_components.deebot.config_flow

And the real problem:

Logger: homeassistant.loader
Source: deps/lib/python3.9/site-packages/deebot_client/models.py:28
First occurred: 3:48:45 PM (2 occurrences)
Last logged: 5:03:37 PM

Unexpected exception importing platform custom_components.deebot.config_flow
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/homeassistant/loader.py", line 722, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/local/lib/python3.9/dist-packages/homeassistant/loader.py", line 739, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/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 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  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 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/homeassistant/custom_components/deebot/__init__.py", line 12, in <module>
    from . import hub
  File "/opt/homeassistant/custom_components/deebot/hub.py", line 9, in <module>
    from deebot_client import Configuration, create_instances
  File "/opt/homeassistant/deps/lib/python3.9/site-packages/deebot_client/__init__.py", line 4, in <module>
    from ._api_client import _InternalApiClient
  File "/opt/homeassistant/deps/lib/python3.9/site-packages/deebot_client/_api_client.py", line 10, in <module>
    from .models import Configuration, Credentials
  File "/opt/homeassistant/deps/lib/python3.9/site-packages/deebot_client/models.py", line 9, in <module>
    class DeviceInfo(dict):
  File "/opt/homeassistant/deps/lib/python3.9/site-packages/deebot_client/models.py", line 28, in DeviceInfo
    def nick(self) -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Currently running (but seen on previous version also):

 Home Assistant 2022.10.4 
Frontend 20221010.0 - latest 

Using Python 3.9.

Many thanks!

edenhaus commented 1 year ago

Please open the next time the issue in the correct repo. The docs are used across multiple projects.

For version 1.4.0 and above you need Python 3.10. Please upgrade python

Whytey commented 1 year ago

Apologies - I didn't realise I was in the wrong repo!

FYI, hass doesn't mandate Python 3.10 from version 2022.7 it is just now functional on Python 3.10. I fear you may have imposed an invalid restriction.

No worries, I will find a way.

Whytey commented 1 year ago

Others, please refer to https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/issues/222