Skip to content
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

visa no attribute VisaIOError #170

Open
JWMac888 opened this issue Aug 18, 2024 · 1 comment
Open

visa no attribute VisaIOError #170

JWMac888 opened this issue Aug 18, 2024 · 1 comment

Comments

@JWMac888
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant