Hi,
I've been using Micropython v1.13 for some time and use webrepl to program the board using Thonny v3.3.3.
This is the code in my boot.py:
import esp
esp.osdebug(None)
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('xxxxx', 'xxxxx')
wlan.isconnected()
import webrepl
webrepl.start()
I uploaded Micropython v1.14 and set it up the same way and enabled webrepl. The board crashes when it reaches wlan.active(True).
Has anyone else had a problem with the new version?
I reverted back to 1.13 and everything is fine again.
Micropython V1.14 Problem
Re: Micropython V1.14 Problem
I'd would be helpful if you add details of the crash from the console.
And if the debug level doesn't impact the crash, I'd suggest raising it.
If it's a brownout, you need to provide more power.
And if the debug level doesn't impact the crash, I'd suggest raising it.
If it's a brownout, you need to provide more power.
Re: Micropython V1.14 Problem
Thanks for the reply.
I've installed version 1.14 on 3 ESP32's.
Tried running webrepl in Thonney with the following result on each one:
WebREPL connected
>>>
Exception in thread Thread-1:
Traceback (most recent call last):
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 827, in transfer_data
message = await self.read_message()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 910, in read_message
return frame.data.decode("utf-8") if text else frame.data
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "D:\Users\joker\AppData\Local\Programs\Thonny\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 54, in _wrap_ws_main
loop.run_until_complete(self._ws_main())
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 66, in _ws_main
await asyncio.gather(self._ws_keep_reading(), self._ws_keep_writing())
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 123, in _ws_keep_writing
await self._ws.send(payload)
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 555, in send
await self.ensure_open()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 812, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
It looks like something in Thonny is broken by the new version.
Power is fine.
I then reinstall version 1.13 and it always works:
WebREPL connected
>>> MicroPython v1.13 on 2020-09-02; ESP32 module with ESP32
Type "help()" for more information.
>>>
I've installed version 1.14 on 3 ESP32's.
Tried running webrepl in Thonney with the following result on each one:
WebREPL connected
>>>
Exception in thread Thread-1:
Traceback (most recent call last):
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 827, in transfer_data
message = await self.read_message()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 910, in read_message
return frame.data.decode("utf-8") if text else frame.data
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "D:\Users\joker\AppData\Local\Programs\Thonny\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 54, in _wrap_ws_main
loop.run_until_complete(self._ws_main())
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 66, in _ws_main
await asyncio.gather(self._ws_keep_reading(), self._ws_keep_writing())
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\thonny\plugins\micropython\webrepl_connection.py", line 123, in _ws_keep_writing
await self._ws.send(payload)
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 555, in send
await self.ensure_open()
File "D:\Users\xxx\AppData\Local\Programs\Thonny\lib\site-packages\websockets\protocol.py", line 812, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
It looks like something in Thonny is broken by the new version.
Power is fine.
I then reinstall version 1.13 and it always works:
WebREPL connected
>>> MicroPython v1.13 on 2020-09-02; ESP32 module with ESP32
Type "help()" for more information.
>>>
Re: Micropython V1.14 Problem
Thonny 3.3.3:
Code: Select all
Initializing Wifi
WebREPL daemon started on ws://192.168.73.69:8266
Started webrepl in normal mode
network config: ('192.168.73.69', '255.255.255.0', '192.168.73.1', '192.168.73.1')
Free mem: 3.90155 MB
Flash size: 16.0 MB
Free flash: 13.98828 MB
MicroPython v1.14-13-gdf85e4881-dirty on 2021-02-12; ESP32 module (spiram) with ESP32
Type "help()" for more information.
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Micropython V1.14 Problem
Joker, this problem has been reported at https://github.com/micropython/micropython/issues/6912.
Next Thonny version (hopefully released by the end of this week) will include a work-around.
Next Thonny version (hopefully released by the end of this week) will include a work-around.
Aivar Annamaa
https://thonny.org
https://thonny.org
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Micropython V1.14 Problem
Thonny 3.3.4 is now released, including the work-around regarding the WebREPL issue in MicroPython 1.14:
https://github.com/thonny/thonny/releases/tag/v3.3.4
https://github.com/thonny/thonny/releases/tag/v3.3.4
Aivar Annamaa
https://thonny.org
https://thonny.org
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: Micropython V1.14 Problem
A regression was introduced in Thonny 3.3.4 (object evaluation in the REPL gave too short capped repr-s). A fix is now published in 3.3.5: https://github.com/thonny/thonny/releases/tag/v3.3.5
Aivar Annamaa
https://thonny.org
https://thonny.org
Re: Micropython V1.14 Problem
Thanks for the update. I now know I'm sane?