On Mon, Apr 19, 2010 at 6:46 PM, Wander Lairson
<wander.lair...@gmail.com> wrote:
> It is really strange it is working with official 0.4.2 version but not
> with 0.1 backend. Specially because it can load the shared library,
> but cannot find any test device... If you want to force usb.legacy to
> use libusb01 backend, we must change legacy.py module, change line 322
> to
>
> import usb.backend.libusb01 as libusb01
> self.devices = [Device(d) for d in core.find(find_all=True,
> backend=libusb01.get_backend())]

After I made the change, pyusb can not find any device. So indeed it is very
strange.

[mc...@myfreebsd ~/Desktop/build/pyusb/tests]$ sudo python testpk2_1.py
Traceback (most recent call last):
  File "testpk2_1.py", line 28, in <module>
    device=opendevice(0x04d8, 0x0033)
  File "testpk2_1.py", line 22, in opendevice
    raise "Device not found"
TypeError: exceptions must be classes or instances, not str

[mc...@myfreebsd ~/Desktop/build/pyusb/tests]$ export PYUSB_DEBUG_LEVEL=debug
[mc...@myfreebsd ~/Desktop/build/pyusb/tests]$ python testpk2_1.py
2010-04-19 20:38:14,825 DEBUG:usb.backend.libusb01:_LibUSB.enumerate_devices()
Traceback (most recent call last):
  File "testpk2_1.py", line 28, in <module>
    device=opendevice(0x04d8, 0x0033)
  File "testpk2_1.py", line 22, in opendevice
    raise "Device not found"
TypeError: exceptions must be classes or instances, not str

[mc...@myfreebsd ~/Desktop/build/pyusb/tests]$ python usbenum.py
2010-04-19 20:42:13,903 DEBUG:usb.backend.libusb01:_LibUSB.enumerate_devices()
[mc...@myfreebsd ~/Desktop/build/pyusb/tests]$



-- 
Xiaofan http://mcuee.blogspot.com

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to