'Why I am getting error in the pyzbar module while using this library it in the QRCode scanning project?

ERROR IS :

Traceback (most recent call last):
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\zbar_library.py", line 58, in load
    dependencies, libzbar = load_objects(Path(''))
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\zbar_library.py", line 50, in load_objects
    deps = [
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\zbar_library.py", line 51, in <listcomp>
    cdll.LoadLibrary(str(directory.joinpath(dep)))
  File "C:\Users\kalep\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\kalep\AppData\Local\Programs\Python\Python39\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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "P:\Prashant\CPP Project Planning\Rooturaj CPP PRoject\Attendance\attend.py", line 3, in <module>
    from pyzbar .pyzbar import decode
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\pyzbar.py", line 7, in <module>
    from .wrapper import (
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\wrapper.py", line 151, in <module>
    zbar_version = zbar_function(
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\wrapper.py", line 148, in zbar_function
    return prototype((fname, load_libzbar()))
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\wrapper.py", line 127, in load_libzbar
    libzbar, dependencies = zbar_library.load()
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\zbar_library.py", line 60, in load
    dependencies, libzbar = load_objects(Path(__file__).parent)
  File "P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\zbar_library.py", line 54, in load_objects
    libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
  File "C:\Users\kalep\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\kalep\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'P:\Prashant\Python\Attendance\lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

I am creating project on attendance system using QR Code scanning and I use Python to create it.
I used all needed libraries in the program like, cv2, numpy, pybase64, pyzbar.

But I am getting this above Error in the Pyzbar.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source