2011/1/3 mike s <mikescal...@hotmail.com>:
>
> Hi,
> I'm trying to start interfacing with USB devices with Python which led me to
> PyUSB. I have installed the following software already:
> Mac OSX 10.6.5
> Xcode
> Python 2.6.6 and 3.2
> pkg-config-0.18.1
> libusb-1.0.8
> pyusb-1.0.0-a1
>
> In Python (2.6) I can have it import the usb.core and usb.util but when I go
> to run a sample test program (below)
> import usb.core
> import usb.util
> # find our device
> dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
> # was it found?
> if dev is None:
>     raise ValueError('Device not found')
> # set the active configuration. With no arguments, the first
> # configuration will be the active one
> dev.set_configuration()
> # get an endpoint instance
> ep = usb.util.find_descriptor(
>         dev.get_interface_altsetting(),   # first interface
>         # match the first OUT endpoint
>         custom_match = \
>             lambda e: \
>                 usb.util.endpoint_direction(e.bEndpointAddress) == \
>                 usb.util.ENDPOINT_OUT
>     )
> assert ep is not None
> # write the data
> ep.write('test')
> I get this error and not the proper one
> Traceback (most recent call last):
>   File "/Users/admin/Desktop/python test/test", line 5, in <module>
>     dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/usb/core.py",
> line 829, in find
>     raise ValueError('No backend available')
> ValueError: No backend available
>
> I've looked around and found a few forums addressing the issue but didn't
> really get a clear answer. I found one that talked about making some changes
> to a file but wasn't real clear on what exactly the changes were. Any help
> would be greatly appreciated.
> Thanks,
> mike scalisi
>
These kind of problems usually happens when people insall libusb from
sources and the default lib directory is not configured as a library
search path. If you still have problems, please activate logging
(check section 'What's wrong' in the PyUSB tutorial*) and report the
results to the mailing list (not me, please).

* http://pyusb.sourceforge.net/docs/1.0/tutorial.html


-- 
Best Regards,
Wander Lairson Costa
LCoN - Laboratório de Computação Natural - Natural Computing Laboratory
(http://www.mackenzie.com.br/lcon.html)
Programa de Pós-Graduação em Engenharia Elétrica (PPGEE)
Faculdade de Computação e Informática (FCI)
Universidade Presbiteriana Mackenzie - SP - Brazil

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to