ModuleNotFoundError: No module named 'busio'

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Giv
 
Posts: 34
Joined: Sat Aug 06, 2016 1:52 pm

ModuleNotFoundError: No module named 'busio'

Post by Giv »

Hi,
I am working with the Grand BANNED M4 board and CircuitPython. I am loading the example "sd_read_simpletest.py" file into the PyCharm Community Edition 2020.3.4 to run, but I keep getting the above error messages "ModuleNotFoundError: No module named 'busio'". I get the same error message on 'Thonny';;

import busio
ModuleNotFoundError: No module named 'busio'


Let me know please.

Regards.

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: ModuleNotFoundError: No module named 'busio'

Post by dastels »

Are you sure you are running the code in CircuitPython on the Grand Central? The busio module is part of CircuitPython. It's always there.

Dave

User avatar
Giv
 
Posts: 34
Joined: Sat Aug 06, 2016 1:52 pm

Re: ModuleNotFoundError: No module named 'busio'

Post by Giv »

Hi,
Yes, please see screen shot attached. You see the drive circuitpy "E:" and Thonny screen with the error message;

That is Not the only issue. I have had no luck in accessing the SD card on the Grand Central M4 with Circuitpy or Arduino. Dcoumentation is minimal. Help please.

Thanks.
Givi
Attachments
Screenshot-busio.jpg
Screenshot-busio.jpg (396.33 KiB) Viewed 168 times

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: ModuleNotFoundError: No module named 'busio'

Post by dastels »

No, as the screenshot shows.

I don't really understand the Windows drive stuff, but you are not running the code in CircuitPython on the GrandCentral. It would have to be directly on CIRCUITPY, named with code.py or main.py.

Also, if the error was coming from CircuitPython it would look like:

Code: Select all

>>> import blah                                                                 
Traceback (most recent call last):                                              
  File "<stdin>", line 1, in <module>                                           
ImportError: no module named 'blah' 
Also, the error pane also says

Code: Select all

"Python 3.7.9" (bundled)
, meaning the code is running in the Python that's part of Thonny.

As for using the SD card, see https://learn.adafruit.com/adafruit-mic ... cuitpython for details on using it from CircuitPython. The grand Central has ,a separate, dedicated SPI bus for the SD card, so when you construct the busio.SPI object, use: SD_CS, SD_MISO, SD_MOSI, and SD_SCK from the board module. In C++ use SPI1 to connect to the card which will be used automatically by the SD library
. See https://learn.adafruit.com/adafruit-mic ... no-library.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”