-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Calling open_resource with a hislip address when the instrument is not available causes hang (works ok using Keysight backend) #428
Comments
Indeed hslip currently ignore the open_timeout. Please have a look at #430 |
Hi @MatthieuDartiailh
I repeated the above test, trying to connect to a non-existent hislip instrument ("hislip999") and it threw the following exception:
I initially thought that this was the expected result however when I repeated the test with an available instrument it threw the same exception. |
Hi @MatthieuDartiailh, did I run it correctly? |
Sorry I have been quite busy lately with little time for OSS. I will try to look into it this week. |
I finally managed to get back to this. Could you give this another spin ? |
ACtually I broke some things sorry. I will let you when you can test. |
Ready for some tests |
Hi @MatthieuDartiailh When using a non-existent hislip address "hislip999" I got:
I'm not sure if this is the exception you are expecting or not. When using a valid hislip address the call to open_resource doesn't throw an exception however if I then call: It throws exception:
|
In both case the exception originate from closing the resource but not when opening it. Could you share your test script ? |
This is the traceback I get trying to connect to a random hislip resource:
For comparison I get the following when using the IVI backend:
The errors are identical in term of error code. I chose to provide more in depth view in the case of pyvisa-py since I consider it potentially useful when debugging. Finallt note that I did not exactly follow the spec since from the spec the open_timeout argument only apply to how long to wait to acquire a lock and is not related to opening of the underlying socket. |
Here's my script with an invalid hislip address: import pyvisa
rm = pyvisa.ResourceManager("@py")
my_instrument = rm.open_resource("TCPIP0::127.0.0.1::hislip999::INSTR") Here's my script with corrrect hislip address: import pyvisa
rm = pyvisa.ResourceManager("@py")
my_instrument = rm.open_resource("TCPIP0::127.0.0.1::hislipHCCU::INSTR")
print("Setting termination")
my_instrument.read_termination = '\n'
print("Calling *IDN?")
result = my_instrument.query("*IDN?")
print("Result:", result) If I remove "@py" from the second script it runs fine, printing the following:
pip list shows:
|
I only tested a case in which I was connecting to an invalid IP address. Here it seems only the hslip "id" is wrong in the bad case. Out of curiosity what is your setup to have a Keysight hislip instrument available on the loop back ? |
My setup is using Keysight software instrument "Hardware Configuration Control Utility" (HCCU): https://www.keysight.com/gb/en/assets/9018-04860/user-manuals/9018-04860.pdf This is running my local PC, however the same issue happens if I run it on a remote PC. |
Hi @DareDevilDenis |
The code below attempts to connect to a non-existent hislip instrument "hislip999" on the local machine. The call to 'open_resource' hangs.
To Reproduce
If I remove
"@py"
so that it uses my installation of Keysight IVI backend then it works as expected - we get immediate exceptionpyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system
Output of
pyvisa-info
The text was updated successfully, but these errors were encountered: