Blinkstick Flex Python consistently encountering "usb.core.USBError: [Errno 32] Pipe error"

Hey folks,

I’m a new blinkstick owner and (relatively) novice python programmer. I’ve been stuck on this USB pipe error for awhile now and don’t know what else to try.

I am using an M1 MacBook and have successfully worked through this issue with all my blinkstick hardware except for the Flex.

I’ve attempted to use several of the suggestions captured in previous support threads but have not found a solution for my issue. I figured i was running up against the overloading issues I’ve seen described by others, but I’ve been able to isolate the problem to any LED greater than index 19. This is happening on any pixel, regardless the color or intensity. To be clear, the LED does turn on exactly as I want, but my python script always exits and I can’t seem to ignore the error.

Could this be a hardware problem? Either something with my mac, the usb cable/ usb-c adapter, or something with the Flex itself? If it is a hardware problem it seems strange that the first 19 indexes work fine, but the higher indexes do not.

Any help/advice is appreciated! Thank you in advance!

The error message:

Setting LED index #20
Traceback (most recent call last):
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/blinkstick/blinkstick.py”, line 249, in _usb_ctrl_transfer
return self.device.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength)
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/core.py”, line 1093, in ctrl_transfer
ret = self._ctx.backend.ctrl_transfer(
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/backend/libusb1.py”, line 897, in ctrl_transfer
ret = _check(self.lib.libusb_control_transfer(
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/backend/libusb1.py”, line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/tcshain/Documents/blinkstick/isolated.py”, line 18, in
main.run()
File “/Users/tcshain/Documents/blinkstick/isolated.py”, line 12, in run
isolation_test(self)
File “/Users/tcshain/Documents/blinkstick/isolated.py”, line 7, in isolation_test
light_source.bstick.set_color(0, run, 25, 0, 0)
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/blinkstick/blinkstick.py”, line 410, in set_color
self._usb_ctrl_transfer(0x20, 0x9, report_id, 0, control_string)
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/blinkstick/blinkstick.py”, line 255, in _usb_ctrl_transfer
return self.device.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength)
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/core.py”, line 1093, in ctrl_transfer
ret = self._ctx.backend.ctrl_transfer(
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/backend/libusb1.py”, line 897, in ctrl_transfer
ret = _check(self.lib.libusb_control_transfer(
File “/Users/tcshain/Library/Python/3.9/lib/python/site-packages/usb/backend/libusb1.py”, line 604, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 32] Pipe error

Isolated Code to reproduce:

from blinkstick import blinkstick

def isolation_test(light_source):
    run = 19

    print("Setting LED index #" + str(run))
    light_source.bstick.set_color(0, run, 25, 25, 0)

class Main(blinkstick.BlinkStickPro):
    def run(self):
        try:
            isolation_test(self)
        except KeyboardInterrupt:
            return

main = Main(max_rgb_value=128)
if main.connect():
    main.run()
else:
    print("No BlinkSticks found")