Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    OS Error 28 - What's wrong with this code?

    Scheduled Pinned Locked Moved LoPy
    6 Posts 4 Posters 2.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      digsatman
      last edited by digsatman

      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!

      0_1477838068155_LopyERR-28.jpg

      1 Reply Last reply Reply Quote 0
      • R Offline
        rockybulwinkle
        last edited by

        I'm seeing this issue too. I'm not sure what's going on.

        1 Reply Last reply Reply Quote 0
        • D Offline
          daniel
          last edited by

          Hello,

          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:

          import os
          os.mkfs('/flash')

          Cheers,
          Daniel

          1 Reply Last reply Reply Quote 0
          • D Offline
            digsatman
            last edited by

            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.

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              abilio @digsatman
              last edited by

              @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?

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                digsatman @abilio
                last edited by digsatman

                @abilio

                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?

                0_1477919541191_lopy_fillmemory.jpg

                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.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom