You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very strange issue. When trying to open a resource from the terminal interpreter it works, but it doesn't when the very same code is executed inside the script. Here is the script:
/usr/local/lib/python3.7/dist-packages/pyvisa_py/tcpip.py:407: UserWarning: TCPIP:instr resource discovery is limited to the default interface.Install psutil: pip install psutil if you want to scan all interfaces.
UserWarning,
('TCPIP::192.168.188.148::INSTR',)
('TCPIP::192.168.188.148::INSTR',)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/tcpip.py", line 452, in after_parsing
self.interface = Vxi11CoreClient(host_address, port, self.open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/tcpip.py", line 356, in __init__
rpc.TCPClient.__init__(self, host, prog, vers, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/protocols/rpc.py", line 821, in __init__
pmap = TCPPortMapperClient(host, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/protocols/rpc.py", line 801, in __init__
RawTCPClient.__init__(self, host, PMAP_PROG, PMAP_VERS, PMAP_PORT, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/protocols/rpc.py", line 452, in __init__
self.connect(1e-3 * open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/protocols/rpc.py", line 486, in connect
raise RPCError("can't connect to server")
pyvisa_py.protocols.rpc.RPCError: can't connect to server
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "short_test.py", line 10, in <module>
instrument = rm.open_resource('TCPIP::192.168.188.148::INSTR')
File "/usr/local/lib/python3.7/dist-packages/pyvisa/highlevel.py", line 3284, in open_resource
res.open(access_mode, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa/resources/resource.py", line 279, in open
self._resource_name, access_mode, open_timeout
File "/usr/local/lib/python3.7/dist-packages/pyvisa/highlevel.py", line 3209, in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/highlevel.py", line 167, in open
sess = cls(session, resource_name, parsed, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/tcpip.py", line 85, in __new__
return newcls(resource_manager_session, resource_name, parsed, open_timeout)
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/sessions.py", line 324, in __init__
self.after_parsing()
File "/usr/local/lib/python3.7/dist-packages/pyvisa_py/tcpip.py", line 454, in after_parsing
raise errors.VisaIOError(constants.VI_ERROR_RSRC_NFOUND)
pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.`
The text was updated successfully, but these errors were encountered:
I have a very strange issue. When trying to open a resource from the terminal interpreter it works, but it doesn't when the very same code is executed inside the script. Here is the script:
The error is following:
The text was updated successfully, but these errors were encountered: