pyvisa: pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
I am trying to use pyvisa to connect a Keysight Network Analyser (E5071C). I can successfully do that in one Dell laptop with CentOS 7.5. But I cannot do that in a Intel NUC with CentOS 7.7, where I get this error:
>>> import visa
>>> rm = visa.ResourceManager()
>>> rm.list_resources()
('ASRL1::INSTR', 'ASRL2::INSTR', 'ASRL3::INSTR', 'ASRL4::INSTR', 'TCPIP0::169.254.158.139::A-E5071C-15158::INSTR')
>>> rm.open_resource('TCPIP0::169.254.158.139::A-E5071C-15158::INSTR')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/lib/python3.6/site-packages/pyvisa/highlevel.py", line 1771, in open_resource
res.open(access_mode, open_timeout)
File "/home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/lib/python3.6/site-packages/pyvisa/resources/resource.py", line 218, in open
self.session, status = self._resource_manager.open_bare_resource(self._resource_name, access_mode, open_timeout)
File "/home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/lib/python3.6/site-packages/pyvisa/highlevel.py", line 1725, in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
File "/home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/lib/python3.6/site-packages/pyvisa/ctwrapper/functions.py", line 1213, in open
ret = library.viOpen(session, resource_name, access_mode, open_timeout, byref(out_session))
File "/home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/lib/python3.6/site-packages/pyvisa/ctwrapper/highlevel.py", line 193, in _return_handler
raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
Here are the “python -m visa info” for both cases. In the successful one, it is:
python -m visa info
Machine Details:
Platform ID: Linux-3.10.0-862.3.3.el7.x86_64-x86_64-with-centos-7.5.1804-Core
Processor: x86_64
Python:
Implementation: CPython
Executable: /home/lab/.local/share/virtualenvs/vna-multiplexer-BYfvy9Wc/bin/python
Version: 3.6.8
Compiler: GCC 4.8.5 20150623 (Red Hat 4.8.5-39)
Bits: 64bit
Build: Aug 7 2019 17:28:10 (#default)
Unicode: UCS4
PyVISA Version: 1.10.1
Backends:
ni:
Version: 1.10.1 (bundled with PyVISA)
#1: /usr/local/vxipnp/linux/lib64/libvisa.so:
found by: auto
bitness: 64
Vendor: National Instruments
Impl. Version: 17825792
Spec. Version: 5244672
In the failed one, there are two backends because I tried installing pyvisa-py as well (unfortunately both not working.)
python -m visa info
Machine Details:
Platform ID: Linux-3.10.0-1062.4.3.el7.x86_64-x86_64-with-centos-7.7.1908-Core
Processor: x86_64
Python:
Implementation: CPython
Executable: /home/jenhao/.local/share/virtualenvs/vna-multiplexer-zkou9k9q/bin/python
Version: 3.6.8
Compiler: GCC 4.8.5 20150623 (Red Hat 4.8.5-39)
Bits: 64bit
Build: Aug 7 2019 17:28:10 (#default)
Unicode: UCS4
PyVISA Version: 1.10.1
Backends:
ni:
Version: 1.10.1 (bundled with PyVISA)
#1: /usr/lib/x86_64-linux-gnu/libvisa.so.19.2.0:
found by: auto
bitness: 64
Vendor: National Instruments
Impl. Version: 19923456
Spec. Version: 5244928
py:
Version: 0.3.1
ASRL INSTR:
Please install PySerial (>=3.0) to use this resource type.
No module named 'serial'
USB INSTR: Available via PyUSB (1.0.2). Backend: libusb1
USB RAW: Available via PyUSB (1.0.2). Backend: libusb1
TCPIP INSTR: Available
TCPIP SOCKET: Available
GPIB INSTR:
Please install linux-gpib to use this resource type.
No module named 'gpib'
Any suggestion is appreciated. Thanks.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (8 by maintainers)
Looking at the programming manual page 28ff, it looks like that some authenfication might be required. Also the device seems to be able to support VXI-11, so I wouild recommend to confirm the settings on the device beside the IP adress.
Also it would be better to open a new issue with this problem in stead of “recycling” this old issue