From b960fdb475f65da2d4b3ffc644799ebd6c698aee Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Sat, 15 Apr 2023 02:00:58 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20U-Offical=20=E5=8F=AF=E8=83=BD=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/utils/character_recognize.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arknights_mower/utils/character_recognize.py b/arknights_mower/utils/character_recognize.py index b84d700e9..dd2adab26 100644 --- a/arknights_mower/utils/character_recognize.py +++ b/arknights_mower/utils/character_recognize.py @@ -188,11 +188,12 @@ def agent(img, draw=False): raise Exception("启动 Plan B") except Exception as e: # 大哥不行了,二哥上! + _msg = str(e) ret_fail.append(poly) - if "Plan B" not in e: - if e in ocr_error.keys(): - name = ocr_error[e] - elif "Off" in e: + if "Plan B" not in _msg: + if _msg in ocr_error.keys(): + name = ocr_error[_msg] + elif "Off" in _msg: name = 'U-Official' else: continue