Hi all,

I‘m trying to build the pyOCD(https://github.com/mbedmicro/pyOCD) with 
pyinstaller, but meet some run-time exception. The pyOCD need a dependency 
named pyusb(https://github.com/walac/pyusb), in its module 
*usb.backend.libusb1/libusb0/openusb* has a function named 
*_load_library(find_library 
= None)*, which is responsible for loading the libusb*.so. However, in the 
rthook dir of pyInstaller, there's a py named *pyi_rth_usb.py* having the 
function _load_library() with almost the same function of the former one. 


So when the pyusb code in the elf file generated by pyinstaller run to the 
following code:

def get_backend(find_library=None):
    global _lib
    try:
        if _lib is None:
            _lib = _load_library(find_library=find_library)(_load_library() in 
pyi_rth_usb.py is called 
instead of the right one _load_library(find_library = None) in pyusb it 
self, which leads to a run-time exception as the function parameter doesn't 
agree)
            _setup_prototypes(_lib)
        return _LibUSB(_lib)
    except usb.libloader.LibaryException:

*expetion:*
2014-04-14 09:29:04,901 ERROR:usb.backend.libusb1:Error loading libusb 1.0 
backend
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", 
line 879, in get_backend
    _lib = _load_library(find_library=find_library)
TypeError: _load_library() takes no arguments (1 given)

*pyinstaller output:*
(part of them)

2266 INFO: Processing hook hook-usb
2461 INFO: Hidden import 'codecs' has been found otherwise
2461 INFO: Hidden import 'encodings' has been found otherwise
2461 INFO: Looking for run-time hooks

*2462 INFO: Analyzing rthook 
/usr/local/lib/python2.7/dist-packages/PyInstaller/loader/rthooks/pyi_rth_usb.pyobjdump:
 
section '.dynamic' mentioned in a -j option, but not found in any input 
file*

So can I disable this usb in order to avoid this problem? If I can, how can 
I realize it?

Thanks a lot!


-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to