shelly bluetooth: TypeError: 'type' object is not subscriptable #2233

Closed
opened 2023-10-29 10:38:37 +01:00 by onkelbeh · 0 comments
Owner
2023-10-29 10:37:23.822 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component homeassistant.components.shelly
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 818, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 40, in <module>
    from .coordinator import (
  File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 11, in <module>
    from aioshelly.ble import async_ensure_ble_enabled, async_stop_scanner
  File "/usr/lib/python3.11/site-packages/aioshelly/ble/__init__.py", line 8, in <module>
    from bluetooth_data_tools import BLEGAPAdvertisement, parse_advertisement_data
  File "/usr/lib/python3.11/site-packages/bluetooth_data_tools/__init__.py", line 7, in <module>
    from .gap import (
  File "src/bluetooth_data_tools/gap.py", line 99, in init bluetooth_data_tools.gap
TypeError: 'type' object is not subscriptable
2023-10-29 10:37:23.840 ERROR (MainThread) [homeassistant.setup] Setup failed for shelly: Unable to import component: Exception importing homeassistant.components.shelly
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 818, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 40, in <module>
    from .coordinator import (
  File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 11, in <module>
    from aioshelly.ble import async_ensure_ble_enabled, async_stop_scanner
  File "/usr/lib/python3.11/site-packages/aioshelly/ble/__init__.py", line 8, in <module>
    from bluetooth_data_tools import BLEGAPAdvertisement, parse_advertisement_data
  File "/usr/lib/python3.11/site-packages/bluetooth_data_tools/__init__.py", line 7, in <module>
    from .gap import (
  File "src/bluetooth_data_tools/gap.py", line 99, in init bluetooth_data_tools.gap
TypeError: 'type' object is not subscriptable

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

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/homeassistant/setup.py", line 215, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 826, in get_component
    raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing homeassistant.components.shelly
``` 2023-10-29 10:37:23.822 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component homeassistant.components.shelly Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 818, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1204, in _gcd_import File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 40, in <module> from .coordinator import ( File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 11, in <module> from aioshelly.ble import async_ensure_ble_enabled, async_stop_scanner File "/usr/lib/python3.11/site-packages/aioshelly/ble/__init__.py", line 8, in <module> from bluetooth_data_tools import BLEGAPAdvertisement, parse_advertisement_data File "/usr/lib/python3.11/site-packages/bluetooth_data_tools/__init__.py", line 7, in <module> from .gap import ( File "src/bluetooth_data_tools/gap.py", line 99, in init bluetooth_data_tools.gap TypeError: 'type' object is not subscriptable 2023-10-29 10:37:23.840 ERROR (MainThread) [homeassistant.setup] Setup failed for shelly: Unable to import component: Exception importing homeassistant.components.shelly Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 818, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1204, in _gcd_import File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/__init__.py", line 40, in <module> from .coordinator import ( File "/usr/lib/python3.11/site-packages/homeassistant/components/shelly/coordinator.py", line 11, in <module> from aioshelly.ble import async_ensure_ble_enabled, async_stop_scanner File "/usr/lib/python3.11/site-packages/aioshelly/ble/__init__.py", line 8, in <module> from bluetooth_data_tools import BLEGAPAdvertisement, parse_advertisement_data File "/usr/lib/python3.11/site-packages/bluetooth_data_tools/__init__.py", line 7, in <module> from .gap import ( File "src/bluetooth_data_tools/gap.py", line 99, in init bluetooth_data_tools.gap TypeError: 'type' object is not subscriptable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/homeassistant/setup.py", line 215, in _async_setup_component component = integration.get_component() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/homeassistant/loader.py", line 826, in get_component raise ImportError(f"Exception importing {self.pkg_path}") from err ImportError: Exception importing homeassistant.components.shelly ```
onkelbeh added the
Bug
label 2023-10-29 10:38:37 +01:00
Sign in to join this conversation.
No Label
Bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: onkelbeh/HomeAssistantRepository#2233
No description provided.