"OSError: [Errno 2] ENOENT" -> can'f find samples when starting from SD card
Hi,
I have used the "Disk Mode (SD)" and mounted the device on Linux and then copied the senor-reactions folder to /mnt/apps/ on the microSD card.
However when then trying to start the app I get the following error:
45.417 st3m.application (INFO): Loading Reaction Game via class entry ReactionGame...
47.019 st3m.application (INFO): Loaded Reaction Game module: <module 'senor-reactions' from '/sd/apps/senor-reactions/__init__.py'>
47.021 st3m.application (INFO): Loaded Reaction Game class: <class 'ReactionGame'>
47.042 st3m.application (INFO): Instantiated Reaction Game class: <ReactionGame object at 3c462370>
Traceback (most recent call last):
File "/flash/sys/main.py", line 3, in <module>
File "/flash/sys/st3m/run.py", line 173, in run_main
File "/flash/sys/st3m/run.py", line 124, in run_view
File "/flash/sys/st3m/reactor.py", line 115, in run
File "/flash/sys/st3m/reactor.py", line 124, in _run_once
File "/flash/sys/st3m/reactor.py", line 149, in _run_top
File "/flash/sys/st3m/processors.py", line 77, in think
File "/flash/sys/st3m/ui/elements/overlays.py", line 76, in think
File "/flash/sys/st3m/ui/view.py", line 181, in think
File "/sd/apps/senor-reactions/__init__.py", line 169, in think
File "/flash/sys/bl00mbox/_user.py", line 541, in new
File "/flash/sys/bl00mbox/_patches.py", line 114, in __init__
File "/flash/sys/cpython/wave.py", line 701, in open
File "/flash/sys/cpython/wave.py", line 285, in __init__
OSError: [Errno 2] ENOENT
MicroPython v1.2.0-15-g999f3f481eae-dirty on 2023-08-22; flow3r with ESP32S3
Type "help()" for more information.
>>> ___ _ |
Traceback (most recent call last):
File "<stdin>", line 1
IndentationError: unexpected indent
>>>
The referenced line in https://git.flow3r.garden/senor/reactions/-/blob/main/init.py#L169 seems to point to /sys/apps/senor-reactions/samples/beep.wav
. However this file does not exist for me:
$ mpremote ls :/flash/sys/apps/senor-reactions/samples/
ls :/flash/sys/apps/senor-reactions/samples/beep.wav
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
OSError: [Errno 2] ENOENT
Instead this one exists for me:
$ mpremote ls :/sd/apps/senor-reactions/samples/
ls :/sd/apps/senor-reactions/samples/
0 beep.wav
0 fail.wav
0 win.wav
Edit: Tested on flow3r v1.2.0. Which added support for loading apps via /flash/apps/ and /sd/apps/. See https://git.flow3r.garden/flow3r/flow3r-firmware/-/blob/main/CHANGELOG.md.