webrepl_setp throws OSError: [Errno 2] ENOENT

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
jmleczko
Posts: 7
Joined: Fri Feb 09, 2018 5:13 pm

webrepl_setp throws OSError: [Errno 2] ENOENT

Post by jmleczko » Sat Feb 10, 2018 6:57 pm

Hello!

I'm using an esp8266 (esp-01) module and I go it flashed with MicroPython. However, when setting up the network, I try running the command "import webrepl_setup" and I get the following error

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "webrepl_setup.py", line 111, in <module>
File "webrepl_setup.py", line 80, in main
File "webrepl_setup.py", line 49, in get_daemon_status
OSError: [Errno 2] ENOENT

I've tried with both versions 1.9.3 and 1.9.2 of MP. Anyone run into this? What's the solution?

Thanks,

-John

cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by cefn » Mon Feb 12, 2018 12:41 am

If this is a 512k ESP-01 then I think it doesn't have enough storage to be able to host a FAT filesystem.

For this reason the file being read around line 49 in webrepl_setup.py cannot be accessed ( see https://github.com/micropython/micropyt ... l_setup.py and taking account of minor version changes, it's probably trying to read boot.py)

You can see some related commentary at https://github.com/micropython/micropython/issues/1986 or https://blog.gypsyengineer.com/en/diy-e ... -512k.html

I think I recall that Webrepl is disabled in the 512kbyte builds, but I can't find the reference. There are warnings that features have been withdrawn to get it small enough at http://micropython.org/download but I am not sure which features in particular.

jmleczko
Posts: 7
Joined: Fri Feb 09, 2018 5:13 pm

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by jmleczko » Wed Feb 21, 2018 7:09 pm

Yup. That was it, not enough storage. Thanks!

Niallp
Posts: 26
Joined: Sun Nov 29, 2015 10:25 pm
Location: Pender Island, BC

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by Niallp » Thu Mar 22, 2018 5:23 pm

Bringing up a fresh esp12 module with micropython, latest from git, looks like a similar problem but the module has a 32 Mbit memory so that isn't the issue.

it doesn't appear to be setting up the filesystem initially and (likely as a consequence) I can't get webrepl_setup going.

It took a few tries to get the module flashed but seems to be consistent now, esp.check_fw() returns true.

On reset I get:

Performing initial setup
Traceback (most recent call last):
File "_boot.py", line 11, in
File "inisetup.py", line 38, in setup
File "inisetup.py", line 8, in wifi
AttributeError: 'module' object has no attribute 'hexlify'
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM

MicroPython v1.9.3-477-g7b0a020-dirty on 2018-03-21; ESP module with ESP8266
Type "help()" for more information.

when I try to import webrepl_setup:

Traceback (most recent call last):
File "", line 1, in
File "webrepl_setup.py", line 102, in
File "webrepl_setup.py", line 71, in main
File "webrepl_setup.py", line 40, in get_daemon_status
OSError: [Errno 1] EPERM

Any ideas appreciated. I've erased flash and reload a couple times.

Edit: tried the distributed binaries and they don't suffer this problem, some toolchain/build problem to sort out ...

allankliu
Posts: 11
Joined: Fri Mar 30, 2018 11:13 am

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by allankliu » Mon Apr 02, 2018 1:07 am

I got similar error report on a NodeMCU (ESP-12F) with 4MB.

Code: Select all

PYB: soft reboot
#6 ets_task(40100130, 3, 3fff838c, 4)
OSError: [Errno 2] ENOENT
OSError: [Errno 2] ENOENT
MicroPython v1.9.3-500-gbc3a5f19 on 2018-03-30; ESP module with ESP8266
Type "help()" for more information.
>>> import webrepl
>>> webrepl.start()
WebREPL is not configured, run 'import webrepl_setup'
>>>
>>> import webrepl_setup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "webrepl_setup.py", line 102, in <module>
  File "webrepl_setup.py", line 71, in main
  File "webrepl_setup.py", line 40, in get_daemon_status
OSError: [Errno 2] ENOENT
Erasing flash and reprogramming firmware don't help.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by pythoncoder » Mon Apr 02, 2018 6:28 am

There seem to be consistent reports of webrepl problems. I suggest someone raises an issue on GitHub: this is the best way to get the attention of the maintainers.
Peter Hinch
Index to my micropython libraries.

allankliu
Posts: 11
Joined: Fri Mar 30, 2018 11:13 am

Re: webrepl_setp throws OSError: [Errno 2] ENOENT

Post by allankliu » Sun Apr 08, 2018 2:31 am

OK, I will issue it to github.

Post Reply