home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
446 stars 69 forks source link

Problems running hass-cli with python 3.10 #379

Closed tbpoetke closed 2 years ago

tbpoetke commented 2 years ago

Since upgrading my arch distro, hass-cli is not working anymore. I got this error in terminal:

Traceback (most recent call last):
  File "/usr/bin/hass-cli", line 33, in <module>
    sys.exit(load_entry_point('homeassistant-cli==0.9.4', 'console_scripts', 'hass-cli')())
  File "/usr/bin/hass-cli", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.10/site-packages/homeassistant_cli/cli.py", line 210, in <module>
    def cli(
  File "/usr/lib/python3.10/site-packages/click/decorators.py", line 308, in decorator
    _param_memo(f, OptionClass(param_decls, **option_attrs))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 2495, in __init__
    super().__init__(param_decls, type=type, multiple=multiple, **attrs)
TypeError: Parameter.__init__() got an unexpected keyword argument 'autocompletion'

someone has an idea to solve this?

Thanks!

fabaff commented 2 years ago

This issue is click-related.

Related #369 and #367

fabaff commented 2 years ago

Should be fixed with #385