home-assistant-ecosystem / home-assistant-cli

:computer: Command-line tool for Home Assistant
Other
428 stars 63 forks source link

Incompatible with click>=8.1.0 #382

Closed mweinelt closed 1 year ago

mweinelt commented 2 years ago

Seems like the API changed there. 8.0.4 works. Many tests currently fail like this if used with the latest clikc version.

tests/test_map.py:9: in <module>
    import homeassistant_cli.cli as cli
homeassistant_cli/cli.py:210: in <module>
    def cli(
/nix/store/0v3zd0zdhs66jhchsn7snqh7kzl45rzd-python3.9-click-8.1.2/lib/python3.9/site-packages/click/decorators.py:308: in decorator
    _param_memo(f, OptionClass(param_decls, **option_attrs))
/nix/store/0v3zd0zdhs66jhchsn7snqh7kzl45rzd-python3.9-click-8.1.2/lib/python3.9/site-packages/click/core.py:2495: in __init__
    super().__init__(param_decls, type=type, multiple=multiple, **attrs)
E   TypeError: __init__() got an unexpected keyword argument 'autocompletion'
ghost commented 2 years ago

For those who found this issue and need to get hass-cli running again, run the following to downgrade the click package.

pip3 install click==8.0.4

onkelbeh commented 1 year ago

Cannot downgrade click. Can't this be fixed?

fabaff commented 1 year ago

Fixed with https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/385