问题
环境:
win11
thonny 4.1.4
树莓派pico RPI_PICO.uf2 文件 :1.22.2
我在使用时,出现保存编写好的py代码后,保存进度卡住,最后强制退出保存状态后出现以下问题。
报错提示
Traceback (most recent call last): File "C:\Program Files\Thonny\lib\tkinter\__init__.py", line 1921, in __call__ return self.func(*args) File "C:\Program Files\Thonny\lib\site-packages\thonny\workbench.py", line 2027, in toolbar_handler handler(*args) File "C:\Program Files\Thonny\lib\site-packages\thonny\running.py", line 527, in cmd_run_current_script self.execute_current("Run") File "C:\Program Files\Thonny\lib\site-packages\thonny\running.py", line 459, in execute_current filename = editor.save_file() File "C:\Program Files\Thonny\lib\site-packages\thonny\editors.py", line 312, in save_file result = self.write_remote_file(save_filename, content_bytes, save_copy) File "C:\Program Files\Thonny\lib\site-packages\thonny\editors.py", line 398, in write_remote_file if "error" in result: TypeError: argument of type 'NoneType' is not iterable
PROBLEM IN THONNY'S BACK-END: Internal error (serial.serialutil.SerialTimeoutException: Write timeout).
See Thonny's backend.log for more info.
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.
Process ended with exit code 0.
解决
我尝试重新烧写过 RPI_PICO v1.22.1版本的uf2文件,并不能重置开发板,之前的py代码文件仍然存在。
刷写一个较低版本的uf2文件即可。尽量跨大版本,如:https://datasheets.raspberrypi.com/soft/micropython-firmware-pico-w-130623.uf2?_gl=13ievlo_gaMTAyMTA5ODU0Ni4xNjkyNjc2Mzk5_ga_22FD70LWDS*MTY5MzM3NDk2My41LjEuMTY5MzM3NTU1Ni4wLjAuMA