PyVISA error, version support

353 views
Skip to first unread message

Robin Finkers

unread,
Sep 25, 2018, 10:41:26 AM9/25/18
to python-ivi
Hello,

I would like to use python-IVI, but the only thing I get are error messages.
I tried different versions of PyVISA and python-ivi.
At the moment i'm running the latest versions: PyVISA 1.9.1 and python-ivi v0.14.9.

The code i'm trying:
import ivi
instr=ivi.agilent.agilent34401A("GPIB0::22::INSTR")

Console:
Exception ignored in: <function Resource.__del__ at 0x0000000005C53C80>
Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\pyvisa\resources\resource.py", line 108, in __del__
  File "C:\Python37\lib\site-packages\pyvisa\resources\resource.py", line 243, in close
  File "C:\Python37\lib\site-packages\pyvisa\resources\resource.py", line 235, in before_close
  File "C:\Python37\lib\site-packages\pyvisa\resources\resource.py", line 252, in __switch_events_off
  File "C:\Python37\lib\site-packages\pyvisa\resources\resource.py", line 309, in disable_event
  File "C:\Python37\lib\site-packages\pyvisa\ctwrapper\functions.py", line 410, in disable_event
  File "C:\Python37\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 188, in _return_handler
pyvisa.errors.VisaIOError: VI_ERROR_INV_OBJECT (-1073807346): The given session or object reference is invalid.

Am i doing something wrong or is it something with version compatibility?

Thanks,
Robin

Alex Forencich

unread,
Sep 25, 2018, 12:20:15 PM9/25/18
to pytho...@googlegroups.com
Try using python-ivi from git.
--
Alex Forencich

Robin Finkers

unread,
Sep 26, 2018, 3:08:17 AM9/26/18
to python-ivi
I have installed that one.
I think it is an other problem.
When i type the code in the terminal it does work, but not as script?

Op dinsdag 25 september 2018 18:20:15 UTC+2 schreef Alex Forencich:

Drakon

unread,
Jul 1, 2020, 7:22:07 AM7/1/20
to python-ivi
I have the same problem. Any solution?
Reply all
Reply to author
Forward
0 new messages