Replies: 1 comment 15 replies
-
found more info =) but stuck at a stupid error |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am trying to do some basic cli testing of commands as I am not that good at Python to write code from scratch.
I have a Viomi S9 vacuum. When I try to run this command I get an error about hw_ver:
─# miiocli viomivacuum --ip 192.168.1.124 --token 78326372527131116c6a436a4a6c3744 info 2 ⨯
Traceback (most recent call last):
File "/usr/local/bin/miiocli", line 8, in
sys.exit(create_cli())
File "/usr/local/lib/python3.9/dist-packages/miio/cli.py", line 63, in create_cli
return cli(auto_envvar_prefix="MIIO")
File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 59, in call
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/miio/click_common.py", line 285, in wrap
result_msg = result_msg_fmt.format(**kwargs)
File "/usr/local/lib/python3.9/dist-packages/miio/device.py", line 88, in hardware_version
if self.data["hw_ver"] is not None:
KeyError: 'hw_ver'
I have seen this error in another project that is connecting to Xiaomi devices. What I ended up doing there was to modify device.py and comment out all lines that tried to check for hardware_version.
Just trying to get to it working one line at a time and would appreciate some help
Beta Was this translation helpful? Give feedback.
All reactions