Open ghost opened 6 months ago
P.S. Also do not include #13 and #73 here. That still did not work. I also tried the opinions from #93 (Because it's similar to that) but still got 0% in the improvement. (btw i know not related to the problem but still concerned me, why is the ones of the issues similar...?)
I just followed stackoverflow and solved it on my computer
I just followed stackoverflow and solved it on my computer
down pyzbar-0.1.9-py2.py3-none-win_amd64.whl in https://pypi.org/project/pyzbar/#files unzip .whl file move libzbar-64.dll and libiconv.dll to Lib\site-packages\pyzbar\ I am using same above step but It not solved
I just followed stackoverflow and solved it on my computer
down pyzbar-0.1.9-py2.py3-none-win_amd64.whl in https://pypi.org/project/pyzbar/#files unzip .whl file move libzbar-64.dll and libiconv.dll to Lib\site-packages\pyzbar\ I am using same above step but It not solved
I install Visual C++ Redistributable Packages for Visual Studio 2013 and solved it on my computer
I install Visual C++ Redistributable Packages for Visual Studio 2013 and solved it on my computer
CHECK THE BOLD MESSAGES
I don't know if this is a common prob to everyone and if this will be the longest Issue ever but I'll try to make it short but still providing the error and the codes:
The Error:
Traceback (most recent call last): File "d:\OneDrive - De La Salle Santiago Zobel School, Inc\Desktop\FLL\app.py", line 3, in <module> from pyzbar.pyzbar import decode File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\pyzbar.py", line 7, in <module> from .wrapper import ( File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 151, in <module> zbar_version = zbar_function( File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 148, in zbar_function return prototype((fname, load_libzbar())) File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 127, in load_libzbar libzbar, dependencies = zbar_library.load() File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 61, in load dependencies, libzbar = load_objects(dll_path.parent) File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 50, in load_objects deps = [ File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 51, in <listcomp> cdll.LoadLibrary(str(directory.joinpath(dep))) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 452, in LoadLibrary return self._dlltype(name) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.
It's literally told there that the problem is libiconv.dll. I will not show my project because it's literally obvious what the problem was. And yes, the file is not in the incorrect path nor corrupted.
This is the unedited code code from zbar_library.py:
`"""Loads zbar and its dependencies. """ import platform import sys
from ctypes import cdll from ctypes.util import find_library from pathlib import Path
all = ['load']
def _windows_fnames(): """For convenience during development and to aid debugging, the DLL names are specific to the bit depth of interpreter.
def load(): """Loads the libzar shared library and its dependencies. """ if 'Windows' == platform.system():
Possible scenarios here
And this is what I edited in the code: `"""Loads zbar and its dependencies. """ import platform import sys
from ctypes import cdll from ctypes.util import find_library from pathlib import Path
all = ['load']
def _windows_fnames(): """For convenience during development and to aid debugging, the DLL names are specific to the bit depth of interpreter.
def load(): """Loads the libzar shared library and its dependencies. """ if 'Windows' == platform.system():
Possible scenarios here
`
This is what error I got now from editing line 59 and 61:
Traceback (most recent call last): File "d:\OneDrive - De La Salle Santiago Zobel School, Inc\Desktop\FLL\app.py", line 3, in
from pyzbar.pyzbar import decode
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\pyzbar.py", line 7, in
from .wrapper import (
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 151, in
zbar_version = zbar_function(
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 148, in zbar_function
return prototype((fname, load_libzbar()))
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\wrapper.py", line 127, in load_libzbar
libzbar, dependencies = zbar_library.load()
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 61, in load
dependencies, libzbar = load_objects(dll_path.parent)
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 50, in load_objects
deps = [
File "C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\zbar_library.py", line 51, in
cdll.LoadLibrary(str(directory.joinpath(dep)))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\ctypes__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\ctypes__init.py", line 374, in init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\Users\zande\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyzbar\libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Almost the same but I change the code with the constructor syntax now. I have been researching from here in github, in other websites, and still didn't find anything to fix this. Can someone from the devs help me here?