Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Adafruit Pybadger error. Giving in and asking for help
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Pybadger error. Giving in and asking for help

by The_Btec on Sat May 02, 2020 12:27 am

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit Pybadge with samd51j19
>>>

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 2, in <module>
ImportError: no module named 'adafruit_pybadger'


This is the version pybadge I have in the library folder on the circuit py drive.
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PyBadger.git"

Ive tried using circuit python 5.0 and tried using different pybadge libraries but cant seem to get rid of this error.

Code: Select all | TOGGLE FULL SIZE
"""Custom badge for PyBadge or PyGamer."""
from adafruit_pybadger import pybadger

pybadger.badge_background(
    background_color=pybadger.WHITE,
    rectangle_color=pybadger.PURPLE,
    rectangle_drop=0.2,
    rectangle_height=0.6,
)

pybadger.badge_line(
    text="@circuitpython", color=pybadger.BLINKA_PURPLE, scale=1, padding_above=1
)
pybadger.badge_line(text="Blinka", color=pybadger.WHITE, scale=3, padding_above=2)
pybadger.badge_line(
    text="CircuitPythonista", color=pybadger.WHITE, scale=1, padding_above=1
)
pybadger.badge_line(
    text="she/her", color=pybadger.BLINKA_PINK, scale=2, padding_above=2
)

while True:
    pybadger.show_custom_badge()

The_Btec
 
Posts: 14
Joined: Mon Aug 12, 2019 2:11 pm

Re: Adafruit Pybadger error. Giving in and asking for help

by danhalbert on Sat May 02, 2020 9:17 am

Could you show us everything that is in CIRCUITPY and in the CIRCUITPY lib folder? You could use screenshots of Finder or Explorer, or whatever works for you.

By the way, if you have not updated the bootloader on your PyBadge, It's important to do so, to prevent it from possibly bricking itself in the future:

https://learn.adafruit.com/adafruit-pyb ... bootloader

danhalbert
 
Posts: 2053
Joined: Tue Aug 08, 2017 12:37 pm

Re: Adafruit Pybadger error. Giving in and asking for help

by The_Btec on Sat May 02, 2020 11:52 am

Thank you for responding. I have adafruit bit map_font, display_notification, display_shapes, adafruit _pybadger, adafruit amg8833.mpy, adafruit_pybadger.py, and neopixel.mpy. Picture from phone was too big. I am doing this on a Pi4 if that helps. Using Mu. I did the system wide pip3 installs through the terminal anyway though. And I'll update the boot loader tonight. I was able get the demo that show youcrolls the leds different colors, shows you different values, and dings like a microwave or Mario bros coin when tapped.

The_Btec
 
Posts: 14
Joined: Mon Aug 12, 2019 2:11 pm

Re: Adafruit Pybadger error. Giving in and asking for help

by danhalbert on Sat May 02, 2020 2:41 pm

You want all these libraries:

adafruit_bitmap_font
adafruit_bus_device
adafruit_display_shapes
adafruit_display_text
adafruit_miniqr.mpy
adafruit_pybadger
neopixel.mpy
adafruit_lis3dh.mpy

per https://learn.adafruit.com/pybadger-eve ... ur-pybadge

The "ImportError" can be misleading; it sometimes it prints the wrong library that is an import of one that exists. I.e., adafruit_pybadger is importing something that's missing.

danhalbert
 
Posts: 2053
Joined: Tue Aug 08, 2017 12:37 pm

Re: Adafruit Pybadger error. Giving in and asking for help

by The_Btec on Sun May 03, 2020 12:22 am

OK so i now have the following libraries and still have the same error:
adafruit_bitmap_font
adafruit_bus_device
adafruit_display_notification
adafruit_display_shapes
adafruit_display_text
adafruit_pybadger
adafruit_amg88xx.mpy
adafruit_lis3dh.mpy
adafruit_miniqr.mpy
adafruit_pybadger.py
neopixel.mpy

Did a reset, opened serial and did soft reboot. No luck yet...
Ill keep hacking around in the mean time to see if I can get lucky. I appreciate your time and help though.

The_Btec
 
Posts: 14
Joined: Mon Aug 12, 2019 2:11 pm

Please be positive and constructive with your questions and comments.