Frankmtl
Frankmtl

Reputation: 121

"No such device" error using pyvisa with pyvisa-py backend

I'm trying to set up pyvisa with Python backend rm=ResourceManager('@py').

When I launch rm.list_resources()

I receive the following error:

libgpib: error locking board mutex!  
Traceback (most recent call last):  
  File "<stdin>", line 1, in <module>  
  File "/home/frank/.local/lib/python2.7/site-packages/pyvisa/highlevel.py", line 1560, in list_resources  
    return self.visalib.list_resources(self.session, query)  
  File "/home/frank/.local/lib/python2.7/site-packages/pyvisa-py/highlevel.py", line 231, in list_resources
    for key, st in sessions.Session.iter_valid_session_classes()], [])  
  File "/home/frank/.local/lib/python2.7/site-packages/pyvisa-py/gpib.py", line 57, in list_resources
    return ['GPIB0::%d::INSTR' % pad for pad in _find_listeners()]  
  File "/home/frank/.local/lib/python2.7/site-packages/pyvisa-py/gpib.py", line 35, in _find_listeners
    if gpib.listener(BOARD, i) and gpib.ask(BOARD, 1) != i:
gpib.GpibError: listener() error: No such device (errno: 19)  

The output of my python -m visa info is:

Machine Details:  
   Platform ID:    Linux-4.2.0-36-generic-x86_64-with-Ubuntu-15.10-wily  
   Processor:      x86_64  

Python:  
   Implementation: CPython  
   Executable:     /usr/bin/python  
   Version:        2.7.10  
   Compiler:       GCC 5.2.1 20151010  
   Bits:           64bit  
   Build:          Oct 14 2015 16:09:02 (#default)  
   Unicode:        UCS4  

PyVISA Version: 1.7

Backends:  
   ni:  
      Version: 1.7 (bundled with PyVISA)  
      #1: /usr/lib/libvisa.so.7:  
         found by: user  
         bitness: n/a  
         Could not get more info:  
            Error while accessing /usr/lib/libvisa.so.7: /usr/lib  /libvisa.so.7: cannot open shared object file: No such file or directory
      #2: /usr/lib/x86_64-linux-gnu/libvisa.so.0.0.0:  
         found by: auto  
         bitness: 64  
         Could not get more info:  
            VI_ERROR_NSUP_ATTR (-1073807331): The specified attribute is not defined or supported by the referenced object.  
   py:  
      Version: 0.2  
      ASRL INSTR: Available via PySerial (2.7)  
      TCPIP INSTR: Available   
      USB RAW: Available via PyUSB (1.0.0rc1). Backend: libusb1  
      USB INSTR: Available via PyUSB (1.0.0rc1). Backend: libusb1  
      GPIB INSTR: Available   
      TCPIP SOCKET: Available   
   sim:  
      Version: 0.3  
      Spec version: 1.1  

Any idea of what I'm missing?

Upvotes: 0

Views: 2292

Answers (1)

A Saxena
A Saxena

Reputation: 165

This is a known bug and here is tracker. I had a similar problem and this link helped.

https://github.com/hgrecco/pyvisa-py/issues/78

Upvotes: 1

Related Questions