mabuchilab / Instrumental

Python-based instrumentation library from the Mabuchi Lab.
http://instrumental-lib.readthedocs.org/
GNU General Public License v3.0
120 stars 80 forks source link

visa no attribute VisaIOError #170

Open JWMac888 opened 2 months ago

JWMac888 commented 2 months ago

I have installed visa, pyvisa and pyvisa-py (both through pip), and can run those modules with e.g., SCPI commands to a Keithley 6487 (i.e., pyvisa.ResourceManager() works).

I then installed Instrumental-lib (through pip). However, using the code provided in the GitHub and readme pages, I get the following errors.

Your help is appreciated...

C:\Users\Colin>python Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32

from instrumental import instrument, list_instruments import visa, pyvisa paramsets = list_instruments() Traceback (most recent call last): File "C:\Users\Colin\AppData\Local\Programs\Python\Python37\lib\site-packages\instrumental\drivers__init.py", line 677, in list_instruments inst_list.extend(list_visa_instruments()) File "C:\Users\Colin\AppData\Local\Programs\Python\Python37\lib\site-packages\instrumental\drivers\init.py", line 621, in list_visa_instruments return list(gen_visa_instruments()) File "C:\Users\Colin\AppData\Local\Programs\Python\Python37\lib\site-packages\instrumental\drivers\init__.py", line 567, in gen_visa_instruments rm = visa.ResourceManager() AttributeError: module 'visa' has no attribute 'ResourceManager'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Users\Colin\AppData\Local\Programs\Python\Python37\lib\site-packages\instrumental\drivers__init__.py", line 678, in list_instruments except visa.VisaIOError: AttributeError: module 'visa' has no attribute 'VisaIOError'

JWMac888 commented 2 months ago

Ok - problem appears to have been the installation of "visa" - after uninstalling that particular module, the list_instruments() appears to work - I have the USB-GPIB-HS interface and list_instruments() returns an empty set