-
Notifications
You must be signed in to change notification settings - Fork 1.3k
AttributeError: 'PixelBuf' object has no attribute '_transmit' #4682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ok, this seems to only happen when I compiled CircuitPython on my machine. The issue does not exist in 6.2.0. |
Also, this occurred at any time when trying to set the dotstar values. |
Ok, I looked at the boot out and it appears I have compiled on the 7.0.0 branch, so this is likely a 7.0.0 CircuitPython bug. |
According to @kattni, this issue has reportedly been seen on the Saola and QT Py M0 Haxpress. I observed in on the FunHouse. |
This appeared for me after 7.0.0 (Saola, but suspect it isn't port-dependent), never saw it in 6.2.0 on any device. Adafruit CircuitPython 7.0.0-alpha.1-790-gaaba6e082-dirty on 2021-04-27; Saola 1 w/Wrover with ESP32S2
>>> import board
>>> import neopixel
>>> status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.05, pixel_order=neopixel.GRB)
>>> status_light[0] = (0, 0, 0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'PixelBuf' object has no attribute '_transmit' |
Adafruit CircuitPython 7.0.0-alpha.1-844-g9e183bbbb on 2021-04-27; Adafruit QT Py M0 Haxpress with samd21e18
>>> import board
>>> import neopixel
>>> pix = neopixel.NeoPixel(board.NEOPIXEL,1)
>>> pix.fill((0,255,0)) # lights up green
>>> pix[0] = (255,0,0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'PixelBuf' object has no attribute '_transmit' |
I'm running into this now that all the 6.2 mpy files are deprecated for 7.0.0 |
FYI -- I was able to "workaround" this on a FunHouse by using adafruit_pypixelbuf in adafruit_dotstar instead of _pixelbuf "works" may be an overstatement. It does not throw the error, but there are still some issues controlling the pixels on the Funhouse. When setting the brightness, not all of the pixels respond reliably. |
This must have something to do with merging the newer versions of Micropython (#4646, #4649). '_transmit' exists in the Neopixel and Dotstar subclasses, not in _Pixelbuf, which is the superclass. So for some reason instead of searching the subclass type for the transmit function and then searching the _Pixelbuf type, it would seem Circuitpython is only searching _Pixelbuf. This would also support why 'fill' would work, as it is a function from _Pixelbuf. It is interesting using adafruit_pypixelbuf works, since that would indicate the problem has to do with subclassing a native type from Circuitpython, but not something written in Python. If @tannewt has plans to continue to merge the newer versions of Micropython perhaps this will be fixed in one of those? |
Makes sense. Last I heard he is planning to continue. If it doesn't fix it, then it would make more sense to address this issue after that is finished so it doesn't break again. |
Yes, the plan is to merge though the current version. As there is no 7.0.0 release yet, I agree we should wait to address this issue until we're done merging MicroPython. |
@jepler Is looking at this. |
I believe this was resolved by #4688 -- OK to close? |
When resuming from light sleep, the code crashes with this error:
I'm not sure what happened since I had previously tested this, but will fix it as soon as I can figure out what is going on.
The text was updated successfully, but these errors were encountered: