-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Pipe error on reconnect to USB instrument #371
Comments
This sounds quite mysterious. But it seems always so with USB issues. If you figure out what differs between your machines, it would be great. On the machine on which things work, does it also work before 0.6.2 ? |
Yeah, no issues of this type before |
Could you also post the full traceback just to help understand where in the stack the error occurs ? |
The original post had a
Here's the requested traceback. I confirmed the same commands work if I downgrade to
|
I'm experiencing the same issue on my Rigol DS1102Z-E and have determined the root cause: USB autosuspend.
Which means devices are autosuspended on a two second timeout. For whatever reason this only happens after the device has been opened/used once, so that means you can access the device once and then repeatedly until you leave it untouched for two seconds. (Note the pipe error originates from the USB layer ( Disabling autosuspend as a workaround fixes it for me:
More importantly, reverting #352 also fixes the issue - ie. ensuring I don't really know USB, so perhaps someone else is able to tell whether this is a pyvisa, pyusb or Rigol bug? |
When opening a resource to a USB instrument after a resource to the same instrument has been closed, an
[Errno 32] Pipe error
may appear. The re-opening doesn't need to happen in the same process; the error will persist until the USB connection is reset by unplugging the cable or until the instrument is power cycled. I have been able to consistently reproduce this on some machines with a Rigol DP832, but other machines don't encounter this issue, even with the samepyvisa-py
version and, to my knowledge, system installations.I searched for versions affected by this and isolated it to
0.6.2
and the #352 and related changes.To Reproduce
Steps to reproduce the behavior:
Output of
pyvisa-info
The text was updated successfully, but these errors were encountered: