usb.core.USBError: [Errno 32] Pipe error after some time #415
-
Hello, I'm getting this error while reading. The communication works fine for about 3 minutes and then this is triggered. I'm using an array for the reads, the essential code looks roughly like this: data_buffer = array("B", bytes(RECV_SIZE))
while True:
read_count = endpoint.read(data_buffer, 1)
if not read_count:
sleep(0.01)
continue
# some data processing here and the traceback looks like this
What could I do to mitigate this problem? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @danielhrisca, Sorry for the delay, I almost lost the notification for this issue... Please take a look at #411 (comment) for some general information about how to investigate a problem like this. That comment deals with a different libusb API, so make sure to check the correct docs for the one being called here ( Also, issues like these usually arise from the device, and commonly require from you a better understanding of the protocol and requirements in use by the device. P.S. Moving this to Discussions/Q/A. |
Beta Was this translation helpful? Give feedback.
-
I have the same error, from console it works fine, from script it doesnt. |
Beta Was this translation helpful? Give feedback.
Hi @danielhrisca,
Sorry for the delay, I almost lost the notification for this issue...
Please take a look at #411 (comment) for some general information about how to investigate a problem like this. That comment deals with a different libusb API, so make sure to check the correct docs for the one being called here (
libusb_bulk_transfer
).Also, issues like these usually arise from the device, and commonly require from you a better understanding of the protocol and requirements in use by the device.
P.S. Moving this to Discussions/Q/A.