Closed Drayrs closed 2 years ago
The PR that added this capability has been merged recently and is not part of the 5.3 release. You can try installing directly from github while waiting for the new release.
Thanks! I am having a hard time installing from github, but that could just be a problem on my end. I will learn to check the release next time.
Can confirm list_resources is functioning on intended now that I have the correct PR installed:
Calling pyvisa.ResourceManager('@py').list_resources()
returns:
2022-09-29 13:49:08,816 - pyvisa - DEBUG - SerialSession was not imported No module named 'serial'.
2022-09-29 13:49:08,817 - pyvisa - DEBUG - USBSession and USBRawSession were not imported No module named 'usb'.
2022-09-29 13:49:08,836 - pyvisa - DEBUG - TCPIPSession was correctly imported.
2022-09-29 13:49:08,841 - pyvisa - DEBUG - GPIBSession was not imported No module named 'gpib'.
2022-09-29 13:49:08,842 - pyvisa - DEBUG - Created library wrapper for py
2022-09-29 13:49:08,842 - pyvisa - DEBUG - Created ResourceManager with session 8399426
('TCPIP::192.168.228.43::INSTR',)
2022-09-29 13:49:09,864 - pyvisa - DEBUG - Closing ResourceManager (session: 8399426)
2022-09-29 13:49:09,864 - pyvisa - DEBUG - Closing ResourceManager (session: 8399426)
Specifying a branch when installing from github fixed the issues I was having there:
poetry add git+https://github.com/pyvisa/pyvisa-py.git#main
Creating a ResourceManager instance and using the list_resources() method is not returning the expected TCPIP instrument. An empty list is returned instead, which was suspicious considering I have instruments available on my subnet. Interestingly, I recreated the TCPIPInstrSession.list_resources method, and was able to return the expected instrument.
Attempting:
Returns:
Output of
pyvisa-info