Hi
My CLUE shows an "OSError: [Errno 5] error Input/output" (Spanish version of circuitPython 7.0) in the "code.py" file.
I'm unable to run any program and everything I tried to modify or delete the code.py file was unsuccessful.
I reloaded the circuitPython UF2 but nothing changed.
Mu editor shows a message to run "chkdsk" to check for corrupt data, but I don't know how to proceed.
I'm running Windows 10 and Linux Mint 20.2 Cinnamon.
Thanks in advance for any help.
OSError 5 in code.py
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: OSError 5 in code.py
Try erasing and reformatting the filesystem by typing this in the REPL:
The board will reset and you will have a fresh CIRCUITPY. Then save your code.py again as usual.
What editor are you using?
Code: Select all
import storage
storage.erase_filesystem()
What editor are you using?
- edoarado
- Posts: 3
- Joined: Wed Dec 01, 2021 3:09 pm
Re: OSError 5 in code.py
Thanks danhalbert
Your code worked like a charm. Problem solved.
The editor I was using when the problem appeared was Mu under Windows 10.
Again, thank you very much.
Your code worked like a charm. Problem solved.
The editor I was using when the problem appeared was Mu under Windows 10.
Again, thank you very much.
- danhalbert
- Posts: 4649
- Joined: Tue Aug 08, 2017 12:37 pm
Re: OSError 5 in code.py
Glad it's working!
If you reset the board before a write has been completed, it can cause the CIRCUITPY to become corrupted. If you copied a file to to CIRCUITPY with Explorer, or something besides the editor, Windows might only partially update the drive. It can sometimes take tens of seconds to update. Doing an "Eject" forces out everything right away. Mu does the right thing and also forces everything out right away.
If you reset the board before a write has been completed, it can cause the CIRCUITPY to become corrupted. If you copied a file to to CIRCUITPY with Explorer, or something besides the editor, Windows might only partially update the drive. It can sometimes take tens of seconds to update. Doing an "Eject" forces out everything right away. Mu does the right thing and also forces everything out right away.
- edoarado
- Posts: 3
- Joined: Wed Dec 01, 2021 3:09 pm
Re: OSError 5 in code.py
Thanks again for your clarification.
I don't remember doing anything wrong, but ... who knows.
I will keep that in mind.
Best regards
I don't remember doing anything wrong, but ... who knows.
I will keep that in mind.
Best regards
Please be positive and constructive with your questions and comments.