From 17c44d2c22e027769851805e8751ef340ea7b1be Mon Sep 17 00:00:00 2001 From: Liu Date: Fri, 21 Feb 2025 19:47:33 +0800 Subject: [PATCH] =?UTF-8?q?fixbug:=E8=A7=A3=E5=86=B3=E6=8A=A2=E7=AD=94?= =?UTF-8?q?=E5=92=8C=E8=8E=B7=E5=8F=96=E4=BB=BB=E5=8A=A1=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game_task/game_task_encyclopedia.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/game_task/game_task_encyclopedia.py b/game_task/game_task_encyclopedia.py index 2eb53d1..5b62245 100644 --- a/game_task/game_task_encyclopedia.py +++ b/game_task/game_task_encyclopedia.py @@ -305,6 +305,16 @@ def submit_answer(group_id, player_id, task_id, answer): f"🌈 比如:1\n" f"🎀 再试一次吧!" ) + except Exception as e : + print(f"submit_answer:{e}") + return ( + f"😅 哎呀,小调皮\n" + f"🌟 任务ID格式不对哦\n" + f"🎈 应该是纯数字\n" + f"🌈 比如:1\n" + f"🎀 再试一次吧!" + ) + finally: cursor.close() conn.close()