[Bug 388042] Re: hid_set_feature_report excepts integers instead longints

djamps dajamppa at gmail.com
Tue Jun 16 18:26:59 UTC 2009


** Description changed:

  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 at foo:~$ python test.py 
  Traceback (most recent call last):
-   File "stripped.py", line 18, in <module>
+   File "test.py", line 14, in <module>
      main()
-   File "stripped.py", line 15, in 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

-- 
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 at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list