Flashing of Valetudo fails with local variable referenced before assignment error
Describe the bug
I wan't to flash Valetudo and followed the guides to setup a pyhton virtual env I can discover the token of my roborock using
mirobo --debug discover --handshake true without a problem. But if I then use this
mirobo --token 46506e556e71357a7737375XXX506d6b --ip 192.168.8.1 update-firmware v11_002034.pkg
I get
Traceback (most recent call last): File "/home/white/Downloads/roborock/venv/bin/mirobo", line 8, in
sys.exit(cli()) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/miio/click_common.py", line 59, in call return self.main(*args, **kwargs) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/click/core.py", line 1637, in invoke super().invoke(ctx) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/home/white/Downloads/roborock/venv/lib/python3.9/site-packages/miio/integrations/vacuum/roborock/vacuum_cli.py", line 72, in cli vac = RoborockVacuum(ip, token, start_id, debug) UnboundLocalError: local variable 'start_id' referenced before assignment
Version information (please complete the following information):
- OS: Arch Linux completly upgraded last week.
- python-miio:
Name: python-miio Version: 0.5.9.1 Summary: Python library for interfacing with Xiaomi smart appliances Home-page: https://github.com/rytilahti/python-miio Author: Teemu R Author-email: [email protected] License: GPL-3.0-only Location: /home/white/Downloads/roborock/venv/lib/python3.9/site-packages Requires: appdirs, construct, cryptography, pytz, tqdm, croniter, PyYAML, click, netifaces, attrs, defusedxml, zeroconf, android_backup Required-by:
Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:
- Model: S50