From a04b9ea053cbd5c66c292598b3aa8a3946fe7f70 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 1 Dec 2024 09:40:19 -0800 Subject: [PATCH] fix: handle file watcher operations only when it exists --- aider/io.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aider/io.py b/aider/io.py index f385af64c..725b6d690 100644 --- a/aider/io.py +++ b/aider/io.py @@ -455,7 +455,7 @@ class InputOutput: self.placeholder = None self.interrupted = False - if not multiline_input: + if not multiline_input and self.file_watcher: self.file_watcher.start() line = self.prompt_session.prompt( @@ -478,12 +478,15 @@ class InputOutput: except EOFError: return "" except Exception as err: - dump(err) + self.tool_error(str(err)) + # print the traceback ai! + return "" except UnicodeEncodeError as err: self.tool_error(str(err)) return "" finally: - self.file_watcher.stop() + if self.file_watcher: + self.file_watcher.stop() if line.strip("\r\n") and not multiline_input: stripped = line.strip("\r\n")