From 386f28e8e52f415b3605cefb97621b2e3d394265 Mon Sep 17 00:00:00 2001 From: zlt Date: Wed, 2 Sep 2026 11:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E5=86=B3=E6=8E=A5=E5=8F=A3=EF=BC=9A?= =?UTF-8?q?=E5=8D=95=E7=A5=A8=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8=E4=B8=8D?= =?UTF-8?q?=E5=B4=A9=E6=95=B4=E6=89=B9=EF=BC=8C=E4=B8=8E=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=BD=A2=E6=80=81=E9=94=99=E8=AF=AF=E7=9A=84=E5=85=9C=E9=94=99?= =?UTF-8?q?=E5=AF=B9=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 9bd7f8b..65e97ea 100644 --- a/api.py +++ b/api.py @@ -99,7 +99,12 @@ def plan_verdict(codes: str | None = None, code: str | None = None, except SystemExit as e: # _norm_code 认不出的形态会 raise SystemExit verdicts.append({"input": c, "error": str(e)}) continue - v = plan_reconcile.verdict(k, L) + try: + v = plan_reconcile.verdict(k, L) + except Exception as e: # noqa: BLE001 —— 单票数据异常(如 score 缺行)不崩整批, + verdicts.append({"input": c, "code": k, # 与上面认不出形态的处理对称 + "error": f"{type(e).__name__}: {e}"}) + continue v["input"] = c verdicts.append(v) return {"date": d, "stale": L.get("stale", ""),