我已经安装了 python 2.7、Pyvisa1.4 和 ni-visa5.4,但运行以下代码时出现错误。
import visa
thermotron = visa.instrument("GPIB::30")
错误是
AttributeError: 'module' object has no attribute 'instrument'
如何解决这个问题?
最佳答案
您似乎滥用了 API。 documentation for PyVisa显示这是正确的用法:
import visa
rm = visa.ResourceManager()
my_instrument = rm.get_instrument('GPIB::14')
关于python - 属性错误: 'module' object has no attribute 'instrument' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23502854/