Howdy,

Under Mac OS X.5 Leopard I get the following error.  with latest SVN
pyUSB and libusb 1.0 driver.


Traceback (most recent call last):
  File "USBTMC.py", line 72, in <module>
    tmd = usb.core.find(find_all=1, custom_match=match_usb_tmc(),
idVendor=0x0699 )
  File "usb/core.py", line 789, in find
  File "usb/core.py", line 762, in device_iter
  File "USBTMC.py", line 9, in __call__
    for cfg in device:
  File "usb/core.py", line 662, in __iter__
  File "usb/core.py", line 360, in __init__
  File 
"/Users/hardkrash/Documents/projects/usbtmc/pyUSB/usb/backend/libusb10.py",
line 363, in get_configuration_descriptor
    config, byref(cfg)))
  File 
"/Users/hardkrash/Documents/projects/usbtmc/pyUSB/usb/backend/libusb10.py",
line 300, in _check
    raise USBError(_str_error[retval.value])
usb.core.USBError: Input/output error


and this error case too

Traceback (most recent call last):
  File "USBTMC.py", line 80, in <module>
    tmd.set_configuration()
  File "usb/core.py", line 483, in set_configuration
  File "usb/core.py", line 48, in managed_set_configuration
  File "usb/core.py", line 666, in __getitem__
  File "usb/core.py", line 360, in __init__
  File 
"/Users/hardkrash/Documents/projects/usbtmc/pyUSB/usb/backend/libusb10.py",
line 363, in get_configuration_descriptor
    config, byref(cfg)))
  File 
"/Users/hardkrash/Documents/projects/usbtmc/pyUSB/usb/backend/libusb10.py",
line 300, in _check
    raise USBError(_str_error[retval.value])
usb.core.USBError: Input/output error


when trying to use this code. ( simplified from original source. )

<<<<<<<<<< snip >>>>>>>>>
import usb

class match_usb_tmc(object):
        def __call__(self, device):
                #if device.is_kernel_driver_active(0):
                #       return False
                for cfg in device:   # fails!
                        print( cfg )
                        intf = usb.util.find_descriptor( cfg, 
bInterfaceClass=0xFE,
bInterfaceSubClass=0x03 )
                        if intf:
                                return True

if __name__ == "__main__":
        from pprint import pprint
        tmd = usb.core.find(find_all=1, custom_match=match_usb_tmc(),
idVendor=0x0699 ) # ( line 72 )
        #tmd = usb.core.find( idVendor=0x0699 ) # comment out above to
workaround my issue, and uncomment this to find a single device.

        if not tmd:
                raise ValueError('Device not found')

        #print tmd.is_kernel_driver_active(0)   # uncomment to fix error when
the device is found.

        tmd.set_configuration()  # fails if above is commented   (line 80)

<<<<<<<<< /snip >>>>>>>>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to