"Error: The device has no langid"
See original GitHub issueI am attempting to connect to a Tektronix DPO 2002B oscilloscope using PyVISA and PyUSB, and when I attempt to run:
address = 'USB0::0x0699::0x0399::<serial>::INSTR'
import visa #import pyVISA
rm = visa.ResourceManager('@py')
print rm.list_resources()
#scope = rm.open_resource(address) #open the oscilloscope
#print scope.query('*IDN?')
I get the error of:
Traceback (most recent call last):
File "<ipython-input-3-8d9e627f2f5d>", line 1, in <module>
runfile('/home/iago/Documents/Code/test_connection_tektronix.py', wdir='/home/iago/Documents/Code')
File "/home/iago/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "/home/iago/anaconda2/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 81, in execfile
builtins.execfile(filename, *where)
File "/home/iago/Documents/Code/test_connection_tektronix.py", line 20, in <module>
print rm.list_resources()
File "/home/iago/anaconda2/lib/python2.7/site-packages/pyvisa/highlevel.py", line 1560, in list_resources
return self.visalib.list_resources(self.session, query)
File "/home/iago/anaconda2/lib/python2.7/site-packages/pyvisa-py/highlevel.py", line 231, in list_resources
for key, st in sessions.Session.iter_valid_session_classes()], [])
File "/home/iago/anaconda2/lib/python2.7/site-packages/pyvisa-py/usb.py", line 169, in list_resources
serial_number=dev.serial_number,
File "/home/iago/anaconda2/lib/python2.7/site-packages/usb/core.py", line 830, in serial_number
self._serial_number = util.get_string(self, self.iSerialNumber)
File "/home/iago/anaconda2/lib/python2.7/site-packages/usb/util.py", line 315, in get_string
raise ValueError("The device has no langid")
ValueError: The device has no langid
This same problem arises from attempting to use open_resource(address) I was able to successfully connect to a LeCroy oscilloscope over TCP/IP, which leads me to believe there is likely an issue with the langid element from PyVISA, since in the file “util.py” in PyUSB, the value of dev.langids is empty (called in line 311).
Thank you for your help!
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ValueError: The device has no langid · Issue #139 - GitHub
The most common cause for ValueError: The device has no langid is simply lack of permission to access the device. Try running your...
Read more >The device has no langid - ChipWhisperer Software
Basically, it means that Windows can see and do all the USB setup it needs for the device, but it won't let libusb...
Read more >Troubleshooting — PyFtdi documentation - GitHub Pages
“Error: The device has no langid”¶. On Linux, it usually comes from the same installation issue as the Access denied error: the current...
Read more >The device has no langid - pyusb-users@lists.sourceforge.net
Hi, I am a user of pyOCD, and I am having an issue related to pyusb which is what the former uses for...
Read more >ws28xx: ValueError: The device has no langid (debian in LXC)
I've just tried to get my ws28xx running on a debian installation running in a LXC on a QNAP NAS. dmesg shows the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When I edited a file, infact created a file “99-garmin.rules” in /etc/udev/rules.d , with the following content: SUBSYSTEM==“usb”, MODE=“0666”, GROUP=“usbusers” I no longer got the same error
This is now documented in PyVISA-py