From 0a420f73f76017cf9725cb7b1de98fcb9f86b035 Mon Sep 17 00:00:00 2001 From: moesnow <11678347+moesnow@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:37:46 +0800 Subject: [PATCH] feat: print ocr exception --- module/ocr/ocr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/ocr/ocr.py b/module/ocr/ocr.py index a153033d..b0b02bcb 100644 --- a/module/ocr/ocr.py +++ b/module/ocr/ocr.py @@ -18,8 +18,8 @@ def instance_ocr(self): logger.debug(_("开始初始化OCR...")) self.ocr = GetOcrApi(self.exePath) logger.debug(_("初始化OCR完成")) - except: - logger.error(_("初始化OCR失败")) + except Exception as e: + logger.error(_("初始化OCR失败:{e}").format(e=e)) self.ocr = None import cpufeature if not cpufeature.CPUFeature["AVX2"]: