如何修复 MicroPython WebREPL ValueError in File "webrepl.py", line 72, in start

问题:

你想使用 webrepl.start(password="...") 以编程方式配置 MicroPython WebREPL,但你看到类似这样的堆栈跟踪

webrepl_stacktrace.txt
>>> webrepl.start(password="Rua8ohjedo")
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "webrepl.py", line 72, in start
ValueError:

解决方案

使用最多 8 个字符的较短密码:

webrepl_usage_example.py
webrepl.start(password="Rua8ohje")

Check out similar posts by category: Embedded, MicroPython, Python