Public bug reported:

Binary package hint: python-hid

Ubuntu 9.04, Python 2.6.2,

hid.hid_set_feature_report function should accept sequence of longints
in path parameter but it excepts integers. I guess something is wrong
with libhid python interface bindings?

Example code below, for testing change matcher.vendor_id and matcher.product_id 
to some device displayed in your lsusb listing.
---
#!/usr/bin/env python
import hid
def main():
        matcher = hid.HIDInterfaceMatcher()
        matcher.vendor_id = 0x1234
        matcher.product_id = 0x0001
        iface = hid.hid_new_HIDInterface()
        hid.hid_open(iface, 0, matcher)
        path = [0xffa00001,0xffa00004]
        bytes = '\0x01'
        hid.hid_set_feature_report(iface, path, bytes)
    
if __name__ == '__main__':
    main()
---
causes error:
r...@foo:~$ python test.py 
Traceback (most recent call last):
  File "stripped.py", line 18, in <module>
    main()
  File "stripped.py", line 15, in main
    hid.hid_set_feature_report(iface, path, bytes)
  File "/var/lib/python-support/python2.6/hid/__init__.py", line 214, in 
hid_set_feature_report
    return _hid.hid_set_feature_report(*args)
ValueError: Expecting a sequence of integers

** Affects: libhid (Ubuntu)
     Importance: Undecided
         Status: New

-- 
hid_set_feature_report excepts integers instead longints
https://bugs.launchpad.net/bugs/388042
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to