Wipy 2.0 Cannot read internal flash without a SD card inserted



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



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

    Thanks.



  • 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


Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.