0

Magtag Import Error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Magtag Import Error

by geersy on Sun Jan 31, 2021 9:27 pm

I've tried a couple different projects with the Magtag that came with Adabox 017, but keep getting this error when loading up:

code.py output:
Traceback (most recent call last):
File "code.py", line 7, in <module>
File "adafruit_magtag/magtag.py", line 32, in <module>
File "adafruit_portalbase/__init__.py", line 28, in <module>
ImportError: no module named 'adafruit_display_text.wrap_text_to_lines'

I've tried to re-load CircuitPython and the libraries, digging through the folders, and can't find a solution. Any help would be great, thank you.

geersy
 
Posts: 5
Joined: Fri Feb 24, 2017 12:23 pm

Re: Magtag Import Error

by dastels on Sun Jan 31, 2021 10:29 pm

Delete everything in CIRCUITPY/lib and empty trash. Then recopy the libraries/modules you need. That usually does the job.

Dave

dastels
 
Posts: 6906
Joined: Tue Oct 20, 2015 3:22 pm

Re: Magtag Import Error

by geersy on Sun Jan 31, 2021 10:51 pm

dastels wrote:Delete everything in CIRCUITPY/lib and empty trash. Then recopy the libraries/modules you need. That usually does the job.

Dave


That worked! Thank you so much!

geersy
 
Posts: 5
Joined: Fri Feb 24, 2017 12:23 pm

Re: Magtag Import Error

by cnorcom on Fri Jun 11, 2021 1:51 pm

Hello! I thought I would add that I am having the same issue. I have tried uploading libraries from the project lib folder I'm using and from the adafruit circuit python bundle. I've deleted the libraries completely and uploaded them and tried adding them one at a time and I till get the "no module named 'adafruit_magtag' error.

It's there - I can see it! I don't know why the program can't.

Thank you!

cnorcom
 
Posts: 10
Joined: Wed Sep 13, 2017 3:29 am

Re: Magtag Import Error

by cnorcom on Fri Jun 11, 2021 2:35 pm

I also just tried re-flashing the .uf2 from a second computer with a different operating system before deleting and uploading the files. I'm still having the same issue.

cnorcom
 
Posts: 10
Joined: Wed Sep 13, 2017 3:29 am

Re: Magtag Import Error

by dastels on Fri Jun 11, 2021 4:06 pm

Did you copy the adafruit_magtag folder to CIRCUITPY/lib?

Dave

dastels
 
Posts: 6906
Joined: Tue Oct 20, 2015 3:22 pm

Re: Magtag Import Error

by cnorcom on Fri Jun 11, 2021 4:40 pm

Yes. About 6 or 7 times now from different computers with different operating systems.

cnorcom
 
Posts: 10
Joined: Wed Sep 13, 2017 3:29 am

Re: Magtag Import Error

by dastels on Fri Jun 11, 2021 5:21 pm

Where you copy from shouldn't matter. Neither should copying repeatedly. Can you post exactly what's on CIRCUITPY and CIRCUITPY/lib? I.e. a screenshot or copy/paste.

Dave

dastels
 
Posts: 6906
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.