From 592eb0cb2c5708fce07ac5f765020f4d160bfe14 Mon Sep 17 00:00:00 2001 From: Fjerkroa Auto Date: Fri, 24 Mar 2023 16:11:14 +0100 Subject: [PATCH] Output the wrong data copy&pastable. --- fjerkroa_bot/ai_responder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fjerkroa_bot/ai_responder.py b/fjerkroa_bot/ai_responder.py index 45a894a..dc2ebd4 100644 --- a/fjerkroa_bot/ai_responder.py +++ b/fjerkroa_bot/ai_responder.py @@ -131,8 +131,8 @@ class AIResponder(object): try: response = json.loads(answer['content']) except Exception as err: - logging.error(f"failed to parse the answer: {pformat(err)}\n{pformat(answer['content'])}") - return AIResponse(None, False, f"ERROR: I could not parse this answer: {pformat(answer['content'])}", None, False) + logging.error(f"failed to parse the answer: {pformat(err)}\n{repr(answer['content'])}") + return AIResponse(None, False, f"ERROR: I could not parse this answer: {repr(answer['content'])}", None, False) if 'hack' not in response or type(response.get('picture', None)) not in (type(None), str): continue logging.info(f"got this answer:\n{pformat(response)}")