简体   繁体   English

为什么在 QRCode 扫描项目中使用此库时 pyzbar 模块中出现错误?

[英]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.我正在使用 QR 码扫描在考勤系统上创建项目,并使用 Python 来创建它。
I used all needed libraries in the program like, cv2 , numpy , pybase64 , pyzbar .我在程序中使用了所有需要的库,例如cv2numpypybase64pyzbar

But I am getting this above Error in the Pyzbar.但是我在 Pyzbar 中得到了上述错误。

I got solution for this issue.我得到了这个问题的解决方案。 I was facing similar issue just installed Visual C++ 64 bit version on my computer and restarted.我刚刚在我的计算机上安装了 Visual C++ 64 位版本并重新启动时遇到了类似的问题。 Choose between vcredist_x86.exe or vcredist_x64.exe based on your machine.根据您的计算机在 vcredist_x86.exe 或 vcredist_x64.exe 之间进行选择。

https://www.microsoft.com/en-us/download/confirmation.aspx?id=40784 . https://www.microsoft.com/en-us/download/confirmation.aspx?id=40784 Hope this solves your issue as well.希望这也能解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在 kaggle 中导入模块时出现错误? - Why am I getting error while importing a module in kaggle? 为什么在 python 中使用 face_recognition 库时出现列表索引超出范围错误? - Why am I getting a list index out of range error while using face_recognition library in python? 为什么在 Apply 中使用 Lambda 时出现错误 - Why I am getting Error while using Lambda within Apply 为什么在 VS Code 中使用 MiniConda 时出现错误? - Why am I getting an error while using MiniConda in VS Code? 在我的 django 项目中安装 web3 模块时出现错误 - I am getting error while installing web3 module in my django project 为什么在 Python 中扫描字符串文字时出现 SyntaxError: EOL? - Why am i getting SyntaxError: EOL while scanning string literal in Python? 为什么在从 openAI 导入 Universe 模块时出现“无效语法”错误 - Why am I getting "invalid syntax" error while importing universe module from openAI 为什么我在之前工作时收到错误消息“ModuleNotFoundError:没有名为‘plotly.express’的模块”? - Why am I getting error message as "ModuleNotFoundError: No module named 'plotly.express" while it was working before? 使用 JWT 模块时出现错误“用户不存在错误” - While using JWT module i am getting an error "user does not exists error" 我的Django项目中出现模块错误 - I am getting a module error in my django project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM