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

    Error instantiating the SD module.

    Scheduled Pinned Locked Moved Discussion
    3 Posts 2 Posters 64 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.
    • V Offline
      VST Admin
      last edited by

      This morning I started up a sample program I was attempting to write to log serial data to an SD Card, connected to an expansion board 3. I didn't get very far before this:

      # main.py -- put your code here!
      
      from machine import UART
      from machine import SD
      
      import time
      import pycom
      import os
      
      sd = SD()
      

      Gives me the error:

      Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
      WiFi connection established
      Pybytes connected successfully (using the built-in pybytes library)
      Pybytes configuration read from /flash/pybytes_config.json
      Traceback (most recent call last):
        File "main.py", line 10, in <module>
      OSError: the requested operation failed
      Pycom MicroPython 1.20.2.rc6 [v1.11-01f49f7] on 2020-02-28; GPy with ESP32
      

      A version of this code was at least running without error yesterday, (even though it was not writing any data to the SD Card. This morning, I start the same code I was running and I get the above error message. That makes no sense to me.

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

        Could there be something happening in your boot.py file that impacts the code in your main? Maybe doing the same operation?

        V 1 Reply Last reply Reply Quote 0
        • V Offline
          VST Admin @railmonitor
          last edited by

          @railmonitor Nothing changed though in my boot.py (which is empty) from one day to the next. However, I believe the internal machinations of the UART and the SD card modules are somehow stepping on each other's proverbial toes.

          I have sense gotten my experiment to work again, but I have no idea why it is working now and why it gave me those messages the other day.

          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