OSError: [Errno 19] ENODEV #17403
-
Good morning, >>> os.chdir("/")
>>> file = open("test.txt")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>> import sys
>>> print(sys.implementation)
(name='micropython', version=(1, 26, 0, 'preview'), _machine='Raspberry Pi Pico W with RP2040', _mpy=4870, _build='RPI_PICO_W')
>>> fs_stat = os.statvfs('/')
>>>
>>> fs_stat
(0, 0, 0, 0, 0, 0, 0, 0, 0, 128)
>>> print(f"File system size {fs_stat[0] * fs_stat[2]:,}")
File system size 0 This is my manifest.py: freeze("$(PORT_DIR)/modules", ("main.py", "ntptime.py", "setup_mode.py"))
# Freeze entire packages to preserve directory structure
package("sensor_code", base_path="$(PORT_DIR)/modules")
package("uwebsockets", base_path="$(PORT_DIR)/modules")
# Include asyncio support
include("$(MPY_DIR)/extmod/asyncio/manifest.py") Don't worry too much about the other files, it's mainly the file writing problem that I'm looking to solve. Let me know if you need more terminal output, or if there is something you'd like me to test. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think the problem lies here freeze("$(PORT_DIR)/modules", ("main.py", "ntptime.py", "setup_mode.py")) The docs state
This seems to imply that, if script is not freeze("$(PORT_DIR)/modules")
freeze("$(PORT_DIR)/modules", ("main.py", "ntptime.py", "setup_mode.py")) As a general point you seem to have made effort to minimise the number of frozen modules. In my experience this is unnecessary: bytecode is compact and the size of the binary is not critical. I routinely freeze an entire GUI with fonts, demos, and unused widgets (along with all the standard files). |
Beta Was this translation helpful? Give feedback.
Please try a build with only
and see if it builds, and if the filesystem is available. If so, the fault is with the second line - I would guess with the path to those files?