Hi,

 I'm trying to use pyusb in a container but it has problem connecting to
libusb.

In the container, libusb is installed using "RUN apt-get install -y
libusb-1.0-0-dev"

and I'm trying this simple code:

import usb.core
import usb.util

def main(args=None):
    #open()
    usb.core.find()

I then get this error message:

python_1    | 2017-12-19 13:58:20,475
DEBUG:usb.backend.libusb1:_LibUSB.__init__(<CDLL 'libusb-1.0.so.0', handle
19ea450 at 0x7fdce0585c50>)
python_1    | 2017-12-19 13:58:20,475 ERROR:usb.backend.libusb1:Error
loading libusb 1.0 backend
python_1    | Traceback (most recent call last):
python_1    |   File
"/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 945,
in get_backend
python_1    |     return _LibUSB(_lib)
python_1    |   File
"/usr/local/lib/python3.6/site-packages/usb/_debug.py", line 60, in do_trace
python_1    |     return f(*args, **named_args)
python_1    |   File
"/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 708,
in __init__
python_1    |     _check(self.lib.libusb_init(byref(self.ctx)))
python_1    |   File
"/usr/local/lib/python3.6/site-packages/usb/backend/libusb1.py", line 595,
in _check
python_1    |     raise USBError(_strerror(ret), ret, _libusb_errno[ret])
python_1    | usb.core.USBError: [Errno None] Other error
python_1    | 2017-12-19 13:58:20,477
DEBUG:usb.backend.libusb1:_LibUSB._finalize_object()


Any idea what might cause the problem?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to