From 7e1fb345c6cc99115158d443e5b565827b190171 Mon Sep 17 00:00:00 2001 From: xunbu Date: Thu, 28 Aug 2025 19:12:00 +0800 Subject: [PATCH] small fix --- docutranslate/agents/agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docutranslate/agents/agent.py b/docutranslate/agents/agent.py index 65f90f9..a20fb77 100644 --- a/docutranslate/agents/agent.py +++ b/docutranslate/agents/agent.py @@ -243,6 +243,8 @@ class Agent: self.logger.warning(f"AI请求连接错误 (sync): {repr(e)}\nprompt:{prompt}") except (KeyError, IndexError) as e: raise Exception(f"AI响应格式错误 (sync): {repr(e)}") + except ValueError as e: + self.logger.warning(f"{e.__repr__()}") # 如果没有正常获取结果则重试 if retry and retry_count < MAX_RETRY_COUNT: if self.total_error_counter.add():