From 1d50577135c3ffa956985759348be092f5d3e769 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Thu, 5 Sep 2024 14:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E7=9A=84=E5=81=A5=E5=A3=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/auto_photo_review.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index feedcb2..3fbf32a 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -77,7 +77,11 @@ def request_ie_result(task_enum, phrecs): # 尝试从二维码中获取高清图片 def get_better_image_from_qrcode(image, dpi=150): js_base_url = 'http://einvoice.jsczt.cn' - results = zxingcpp.read_barcodes(image) + try: + results = zxingcpp.read_barcodes(image) + except Exception as e: + logging.getLogger('error').info("二维码识别失败", exc_info=e) + results = [] for result in results: pdf = None pdf_path = None