Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting up entry ClarkNBMax for ninebot_scooter #4

Open
JoeyGE0 opened this issue Aug 13, 2024 · 1 comment
Open

Error setting up entry ClarkNBMax for ninebot_scooter #4

JoeyGE0 opened this issue Aug 13, 2024 · 1 comment

Comments

@JoeyGE0
Copy link

JoeyGE0 commented Aug 13, 2024

Error on setup:
`Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: 4:23:57 PM (2 occurrences)
Last logged: 4:24:07 PM

Error setting up entry ClarkNBMax for ninebot_scooter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/ninebot_scooter/sensor.py", line 69, in
PassiveBluetoothProcessorEntity[PassiveBluetoothDataProcessor[str | int | None]],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 398, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 1101, in _generic_class_getitem
_check_generic(cls, params, len(cls.parameters))
File "/usr/local/lib/python3.12/site-packages/typing_extensions.py", line 2947, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2

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

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ninebot_scooter/init.py", line 64, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2085, in async_forward_entry_setups
await integration.async_get_platforms(platforms)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1284, in _load_platform
raise ImportError(
ImportError: Exception importing custom_components.ninebot_scooter.sensor
`

@JoeyGE0
Copy link
Author

JoeyGE0 commented Aug 31, 2024

solved by editing line 69 in sensor.py. shown here #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant