'module' object has no attribute 'NeoPixel' - LED strip 1138

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
d7x
 
Posts: 77
Joined: Tue Oct 25, 2011 10:41 pm

'module' object has no attribute 'NeoPixel' - LED strip 1138

Post by d7x »

I'm running CircuitPython 2.3.0 with the Mu editor and the 1138 LED strip. I'm using the CircuitPython demo for the NeoPixel https://learn.adafruit.com/adafruit-cir ... n-neopixel I have the latest CircuitPython libraries installed. I'm using a Metro M0 Express board.

When I reload, I'm getting
File "code.py", line 2, in <module>
File "neopixel.py", line 7, in <module>
AttributeError: 'module' object has no attribute 'NeoPixel'

Any ideas what might be causing this?

Here's the code:
import board
import neopixel
import time

pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2)
pixels.fill((0,0,0))
pixels.show()

User avatar
shawnerz
 
Posts: 8
Joined: Sat Jan 20, 2018 5:56 pm

Re: 'module' object has no attribute 'NeoPixel' - LED strip

Post by shawnerz »

Did you ever get a response to this? I'm having the same problem.
Thanks,
-Shawn

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: 'module' object has no attribute 'NeoPixel' - LED strip

Post by adafruit2 »

try updating to CircuitPython 3 or 4, the API may have changed - and its been a long time since 2 :)

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

Return to “Adafruit CircuitPython”