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

TypeError: init() got an unexpected keyword argument 'model' on deprecated classes on miiocli #1199

Closed
artur5236 opened this issue Dec 1, 2021 · 5 comments
Labels

Comments

@artur5236
Copy link

artur5236 commented Dec 1, 2021

miiocli -d airhumidifiercb1 --ip 192.168.5.91 --token xxx status
Result:

INFO:miio.cli:Debug mode active
Traceback (most recent call last):
File "/usr/local/bin/miiocli", line 10, in
sys.exit(create_cli())
File "/usr/local/lib/python3.7/dist-packages/miio/cli.py", line 63, in create_cli
return cli(auto_envvar_prefix="MIIO")
File "/usr/local/lib/python3.7/dist-packages/miio/click_common.py", line 59, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1656, in invoke
super().invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/miio/click_common.py", line 270, in group_callback
ctx.obj = self.device_class(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'model'

Name: python-miio
Version: 0.5.9

@artur5236 artur5236 added the bug label Dec 1, 2021
@rytilahti
Copy link
Owner

rytilahti commented Dec 1, 2021

I think this is a regression introduced in #1146. Could you try if miiocli airhumidifier --ip 192.168.5.91 --token xxx status or miiocli airhumidifier --ip 192.168.5.91 --token xxx --model zhimi.humidifier.cb1 status are working fine for you?

@artur5236
Copy link
Author

Thank you. miiocli airhumidifier --ip 192.168.5.91 --token xxx status working fine.

@rytilahti
Copy link
Owner

Great! Let's keep this still open as it's clearly a bug.

@rytilahti rytilahti reopened this Dec 1, 2021
@artur5236
Copy link
Author

I get below warning:
WARNING:miio.device:Found an unsupported model 'zhimi.humidifier.cb1' for class 'AirHumidifier'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio

@rytilahti rytilahti changed the title Support for airhumidifiercb1? TypeError: init() got an unexpected keyword argument 'model' on deprecated classes Dec 1, 2021
@rytilahti rytilahti changed the title TypeError: init() got an unexpected keyword argument 'model' on deprecated classes TypeError: init() got an unexpected keyword argument 'model' on deprecated classes on miiocli Dec 1, 2021
@rytilahti
Copy link
Owner

As those deprecated classes were removed already in #1343, this issue is not anymore relevant.

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

No branches or pull requests

2 participants