OS Error 28 - What's wrong with this code?
Am I doing something really stupid? What is OS Error 28 and is there a list of errors as I assume there must be at least 27 others!
This is what caused the problem. The loop never finishes and comes up with Error 28. As I did not know that it meant "no space available" but guessed as much, I deleted the file that had been written. It disappeared from the directory and although the LoPy would allow me to create new files with os.open('filename','w') it would not let me write to the new file as Error 28 was returned. It would seem that deleting a file is not enough and a full os.mkfs('/flash') is needed to get things working again. I was not able to find anything that would let me find how much free space or capacity there was on the flash file system. Is there something I have missed?
When program runs, it turns off the heartbeat, turns the led green and should (if all went well) end with the led turning red and the file being closed. With the error, the led never goes red and the file is not closed by the program.
@digsatman, thanks for your report. I'm filling a report in order to check this. Do you have a specific list of steps to reproduce it?
I had deliberately written a large file to flash and got the error. As you have said it is a 'no space ' error, I am surprised that deleting the file did not free up space again and new file names could be created in flash without an error. Not quite working as it should it would appear.
We'll add the errno module in the next release. Error 28 means no space available. That was probably caused by errors during a failed firmware update. Just format your file system:
I'm seeing this issue too. I'm not sure what's going on.