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

    Wipy 2.0 Cannot read internal flash without a SD card inserted

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 2.0sdcarderror
    3 Posts 2 Posters 1.4k Views 2 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.
    • tobzT Offline
      tobz
      last edited by

      I'm trying to read a file from the internal flash, but to do so I must have a sd card inserted even though I'm not using it.

      If I try without a card I get this:

      >>> from machine import SD
      >>> sd = SD()
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      OSError: the requested operation failed
      

      It works fine when a SD card is inserted.

      Is what I'm trying to do possible?

      1 Reply Last reply Reply Quote 0
      • Jurassic PorkJ Offline
        Jurassic Pork
        last edited by Jurassic Pork

        hello,
        what is your code to read your file ?
        you don't need to use SD to play with the internal flash file system.
        Example to list files and read the content of the boot.py file in the internal flash file system :

        import os                                                                                                           
        os.listdir()                                                                                                        
        f = open('boot.py')                                                                                                 
        f.read() 
        f.close()                                                                                                                    
        

        Friendly, J.P

        1 Reply Last reply Reply Quote 1
        • tobzT Offline
          tobz
          last edited by

          Ah derp. yeah that works.
          I'm new to (micro)python & coding for hardware, so learning lots at the moment.

          Thanks.

          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