Closed ragrylesvani closed 11 months ago
I need to double-check the code, but right now, I suspect that the issue comes from the resource name looking weird (::0 before the INSTR). Typically the device manufacturer and device ID are not read from the bus since they are part of the resource name, but since here the name looks odd it may not have been parsed properly.
How did you obtain that resource name ?
So it seems I was wrong and the attributes are simply not set. #399 should fix the issue. Could you test ? I have no instrument on hand to test.
To answer your question, I got the resource name by listing the connected devices through the pyvisa-shell
. To my understanding, that is how pyvisa has stored that name for itself locally.
I will try my hand at testing these changes and get back with any results.
It seems the change is successful in populating the aforementioned fields.
Thank you for working on this!
I will merge and try to release soon
In the past I was able to get python to derive a lot of information about the connected device (such as Manufacturer ID), but now pyvisa-py fails to identify anything about the device other than the bare basics.
PyUSB seems to be able to derive this information, and so is the Linux OS. I am wondering if there is an issue with how the Resource Class in instantiated, or how/why there is a failure to propagate this infromation up into pyvisa-py?
Instrument details
Output of
pyvisa-info
Machine Details: Platform ID: Linux-5.4.0-135-generic-x86_64-with-glibc2.27 Processor: x86_64
Python: Implementation: CPython Executable: ...bin/python Version: 3.8.0 Compiler: GCC 8.4.0 Bits: 64bit Build: Dec 9 2021 17:53:27 (#default) Unicode: UCS4
PyVISA Version: 1.13.0
Backends: ivi: Version: 1.13.0 (bundled with PyVISA) Binary library: Not found py: Version: 0.7.0 USB INSTR: Available via PyUSB (1.2.1). Backend: libusb1 USB RAW: Available via PyUSB (1.2.1). Backend: libusb1 TCPIP INSTR: Available Resource discovery: