EACCES issue with '/sd' subdirectory

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
kbrenner
Posts: 46
Joined: Mon Jan 20, 2020 8:05 pm

EACCES issue with '/sd' subdirectory

Post by kbrenner » Thu Nov 19, 2020 3:45 pm

I am attempting to remove a directory on the SD card on the PYBD-SF6W. I am using the command os.rmdir(<name of directory>); however, I am receiving the following error:

>>> os.rmdir('ControllerData')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 13] EACCES

Does anyone know why this might be occurring?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: EACCES issue with '/sd' subdirectory

Post by dhylands » Thu Nov 19, 2020 4:02 pm

Did you try using "os.rmdir("/sd/ControllerData") (or whatever the correct path is) and is the directory empty?

os.rmdir("ControllerData") will try to remove the file from the current directory, which I think by default would be /

Post Reply