dfuse-tool icon indicating copy to clipboard operation
dfuse-tool copied to clipboard

The device does not support the specified langid

Open mobilinkd opened this issue 8 years ago • 3 comments

Traceback (most recent call last):
  File "./dfuse-tool.py", line 147, in <module>
    flash(args)
  File "./dfuse-tool.py", line 63, in flash
    dfu = find_device(args)
  File "./dfuse-tool.py", line 14, in find_device
    for _,alt in dfu.alternates():
  File "/home/rob/dfuse-tool/dfuse/DfuDevice.py", line 28, in alternates
    return [(self.get_string(intf.iInterface), intf) for intf in self.cfg]
  File "/home/rob/dfuse-tool/dfuse/DfuDevice.py", line 28, in <listcomp>
    return [(self.get_string(intf.iInterface), intf) for intf in self.cfg]
  File "/home/rob/dfuse-tool/dfuse/DfuDevice.py", line 73, in get_string
    return usb.util.get_string(self.dev, 256, index)
  File "/usr/lib/python3.5/site-packages/usb/util.py", line 318, in get_string
    raise ValueError("The device does not support the specified langid")
ValueError: The device does not support the specified langid

This is because usb.util.get_string() fails. And this appears to be failing because the args are wrong.

This occurs on Fedora 24 with: python3-pyusb-1.0.0-1.fc24.noarch

mobilinkd avatar Mar 25 '17 15:03 mobilinkd

https://github.com/walac/pyusb/commit/dac78933f6a6eaf5ae82f48e2f4e7d1733dc2f98#diff-23d5219b9f9598e15347eacae1ec161e changed the interface to this call in 2013.

mobilinkd avatar Mar 25 '17 16:03 mobilinkd

Hi, what if that configuration already exists but the error message keeps showing? Thank you.

ateneolab avatar May 27 '19 06:05 ateneolab

I had the same error message. To fix this you need to go into 'dfuse/DfuDevice.py' and change line 73 from:

return usb.util.get_string(self.dev, 256, index)

to

return usb.util.get_string(self.dev, index)

pms67 avatar Aug 28 '20 18:08 pms67