From 1fe2be4633eb9fcf02635a44e015809ad34721ea Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 23 Sep 2024 11:38:51 -0700 Subject: [PATCH] fix: ignore unicode errors in append_chat_history --- aider/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/io.py b/aider/io.py index 897211355..37426bbf6 100644 --- a/aider/io.py +++ b/aider/io.py @@ -626,7 +626,7 @@ class InputOutput: text += "\n" if self.chat_history_file is not None: try: - with self.chat_history_file.open("a", encoding=self.encoding) as f: + with self.chat_history_file.open("a", encoding=self.encoding, errors="ignore") as f: f.write(text) except (PermissionError, OSError): self.tool_error(