Activity log for bug #388042

Date Who What changed Old value New value Message
2009-06-16 18:19:56 djamps bug added bug
2009-06-16 18:26:59 djamps description 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: root@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 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: root@foo:~$ python test.py Traceback (most recent call last): File "test.py", line 14, in <module> main() File "test.py", line 11, 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