Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 2] ENOENT #38

Open
robmarkcole opened this issue Oct 16, 2018 · 8 comments
Open

OSError: [Errno 2] ENOENT #38

robmarkcole opened this issue Oct 16, 2018 · 8 comments

Comments

@robmarkcole
Copy link

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:

WebREPL daemon started on ws://192.168.4.1:8266
WebREPL daemon started on ws://0.0.0.0:8266
Started webrepl in normal mode
OSError: [Errno 2] ENOENT
@Singein
Copy link

Singein commented Oct 22, 2018

is there a file named main.py?

@robmarkcole
Copy link
Author

I didn't create one, but if that's the cause of the error would be good to catch that

@Singein
Copy link

Singein commented Oct 22, 2018

I think the current mpy error requires some experience and imagination.

@Singein
Copy link

Singein commented Oct 22, 2018

please see the issue #40,I really want to share with the community.

@murilopolese
Copy link

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

@inovatorius
Copy link

inovatorius commented Aug 12, 2023

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

@f4grx
Copy link

f4grx commented Jan 23, 2024

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.

@f4grx
Copy link

f4grx commented Jan 23, 2024

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:

https://github.com/micropython/micropython-lib/blob/master/micropython/umqtt.simple/umqtt/simple.py#L72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants