Open Snyzar opened 4 years ago
This happens because pyvisa assumes that close can be safely called on an already closed resource. This is the case in the standard backend however it is not so for the GPIB part of pyvisa-py. The fix should be relatively easy, if you want to give it a try feel free to do so. And thanks for reporting the issue !
I'm rather new to python on Linux, so apologies if I miss anything obvious. I'm also not certain if this is an actual issue or I just need support, but I appreciate any assistance all the same.
My test system is basically a glorified thermometer at the moment, with the following script to get a single measurement:
This will print the value I'm looking for but won't terminate cleanly:
This error doesn't occur using python 2.7.16. It also does not occur when using Gpib directly with
inst = Gpib.Gpib(0,8)
on 3.7.3, which is why I figured it has to do with pyvisa-py.My module info:
and the output with
log_to_screen()
:For what it's worth, I noticed running against 2.7 with
log_to_screen()
that the final "Closing ResourceManager" message is not printed.