Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinError 126 after building during execution *.exe #33

Closed
573N opened this issue Jun 12, 2018 · 4 comments
Closed

WinError 126 after building during execution *.exe #33

573N opened this issue Jun 12, 2018 · 4 comments

Comments

@573N
Copy link

573N commented Jun 12, 2018

pyzbar 0.1.7
Python 3.4.4
py2exe 0.9.2.2

Traceback (most recent call last):
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 58, in load
dependencies, libzbar = load_objects(Path(''))
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 52, in load_objects
for dep in dependencies
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 52, in
for dep in dependencies
File "c:\python34\lib\ctypes_init_.py", line 429, in LoadLibrary
return self.dlltype(name)
File "c:\python34\lib\ctypes_init
.py", line 351, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "RecIT.pyw", line 5, in
File "", line 2237, in _find_and_load
File "", line 2226, in _find_and_load_unlocked
File "", line 1191, in _load_unlocked
File "", line 1161, in _load_backward_compatible
File "c:\python34\lib\site-packages\pyzbar\pyzbar.py", line 7, in
from .wrapper import (
File "", line 2237, in _find_and_load
File "", line 2226, in _find_and_load_unlocked
File "", line 1191, in _load_unlocked
File "", line 1161, in load_backward_compatible
File "c:\python34\lib\site-packages\pyzbar\wrapper.py", line 148, in
c_uint_p, # minor
File "c:\python34\lib\site-packages\pyzbar\wrapper.py", line 141, in zbar_function
return prototype((fname, load_libzbar()))
File "c:\python34\lib\site-packages\pyzbar\wrapper.py", line 120, in load_libzbar
libzbar, dependencies = zbar_library.load()
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 60, in load
dependencies, libzbar = load_objects(Path(file).parent)
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 52, in load_objects
for dep in dependencies
File "c:\python34\lib\site-packages\pyzbar\zbar_library.py", line 52, in
for dep in dependencies
File "c:\python34\lib\ctypes_init
.py", line 429, in LoadLibrary
return self.dlltype(name)
File "c:\python34\lib\ctypes_init
.py", line 351, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden

@573N
Copy link
Author

573N commented Jun 12, 2018

looks like this: #13
i have installed Visual C++ Redistributable Packages for Visual Studio 2013 but same problem :(

@quicklizard99
Copy link
Member

It is likely that the DLLs (32-bit: libzbar-32.dll and libiconv-2.dll; 64-bit: libzbar-64.dll and libiconv.dll) have not been included in the build created by py2exe.

@573N
Copy link
Author

573N commented Jun 12, 2018

ok, i copy libzbar-64.dll and libiconv.dll to the build and new error but not from pyzbar :(

I know it's not a problem with pyzbar anymore but maybe it helps others

Traceback (most recent call last):
File "c:\python34\lib\site-packages\numpy\core_init_.py", line 16, in
from . import multiarray
File "", line 10, in
File "", line 8, in __load
ImportError: (DLL load failed: Das angegebene Modul wurde nicht gefunden.) 'E:\git_aktuell\RecIT\dist\numpy.core.multiarray.pyd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "RecIT.pyw", line 7, in
File "c:\python34\lib\site-packages\numpy_init_.py", line 142, in
from . import add_newdocs
File "c:\python34\lib\site-packages\numpy\add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "c:\python34\lib\site-packages\numpy\lib_init_.py", line 8, in
from .type_check import *
File "c:\python34\lib\site-packages\numpy\lib\type_check.py", line 11, in
import numpy.core.numeric as nx
File "c:\python34\lib\site-packages\numpy\core_init
.py", line 26, in
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try git clean -xdf (removes all
files not under version control). Otherwise reinstall numpy.

Original error was: (DLL load failed: Das angegebene Modul wurde nicht gefunden.) 'E:\git_aktuell\RecIT\dist\numpy.core.multiarray.pyd'

@573N
Copy link
Author

573N commented Jun 12, 2018

ok i have a workaround, not nice but works

py2exe does not work and so I use pyinstaller

libiconv.dll, libzbar-64.dll and opencv_ffmpeg341_64.dll(for cv2) must be in the exe folder

please close

@573N 573N closed this as completed Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants