Hello,

I've recently updated my OS (to openSuSe 11.3), after changing my motherboard 
(long story). Probably more relevant is the fact that at the same time I'm 
going from pyusb 0.1ish to pyusb-1.0.0-a1

Code that had been working well is now going through the compatibility/legacy 
layer, which seems to _almost_ work. The issue appears when I claim the USB 
interface. Here's the tail of the traceback:

  File "./acquisition/scope.py", line 975, in _foundrightscope
    self.hand.claimInterface(self.face)
  File "/usr/local/lib/python2.6/site-packages/usb/legacy.py", line 225, in 
claimInterface
    util.claim_interface(self.dev, interface)
  File "/usr/local/lib/python2.6/site-packages/usb/util.py", line 191, in 
claim_interface
    device._ctx.managed_claim_interface(device, interface)
  File "/usr/local/lib/python2.6/site-packages/usb/core.py", line 112, in 
managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/usr/local/lib/python2.6/site-packages/usb/_debug.py", line 52, in 
do_trace
    return f(*args, **named_args)
  File "/usr/local/lib/python2.6/site-packages/usb/backend/libusb10.py", line 
471, in claim_interface
    _check(_lib.libusb_claim_interface(dev_handle, intf))
ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type

"self.hand" is of type <class 'usb.legacy.DeviceHandle'> (It came from a call 
to "dev.open()", where "dev" is of type <class 'usb.legacy.Device'>.)
"self.face" is of type <class 'usb.legacy.Interface'>

The wiki page that I used to use for reference 
(http://wiki.erazor-zone.de/wiki:projects:python:pyusb:pydoc) doesn't appear to 
talk about conversion or use of the new & improved pyusb...

Could someone tell me where to go for conversion / interface docs? I'd like to 
do as little code conversion as possible, but I'm not sure where to start.

Thanks

-Sarah




      
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to