Open robmarkcole opened 6 years ago
is there a file named main.py?
I didn't create one, but if that's the cause of the error would be good to catch that
I think the current mpy error requires some experience and imagination.
please see the issue #40,I really want to share with the community.
This is a "No such file or directory" error thrown by Python (and other languages):
https://docs.python.org/2/library/errno.html#errno.ENOENT
It means it tried to open a file that doesn't exist. I believe the ESP8266 port will always try to run the boot.py
and main.py
files on boot:
https://github.com/micropython/micropython/blob/master/ports/esp8266/main.c#L68-L71
MicroPython v1.20.0 on ESP8266
>>> import webrepl_setup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "webrepl_setup.py", line 1, in <module>
File "webrepl_setup.py", line 1, in main
File "webrepl_setup.py", line 1, in get_daemon_status
OSError: [Errno 2] ENOENT
boot.py
should be on the filesystem to avoid this error, see https://github.com/micropython/micropython-lib/blob/master/micropython/net/webrepl/webrepl_setup.py
Please catch this exception with an indication that boot.py is required, or just accept the absence of boot.py
This makes quite a bad user experience to be greeted with an uncaught exception for such a simple non-blocking issue, in a setup assistant.
Also, how hard would it be to use secure web sockets ? that would allow web browsers to use the https version of the webrepl client. it seems that ssl is available in micropython and ssl can be added to any protocol in just one line, like is done with mqtt:
System: MicroPython v1.9.4-8-ga9a3caad0 on 2018-05-11; ESP module with ESP8266 Issue: unable to connect to the wifi point setup by the board and receive the following error on startup: