From 743412777da659fac69c6b01eed71e1af21dcc0d Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 27 Aug 2024 05:27:17 -0700 Subject: [PATCH] fix: Handle errors when loading tags cache --- aider/repomap.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/aider/repomap.py b/aider/repomap.py index 8313992f2..5caa008a3 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -163,9 +163,11 @@ class RepoMap: def load_tags_cache(self): path = Path(self.root) / self.TAGS_CACHE_DIR - if not path.exists(): - self.cache_missing = True - self.TAGS_CACHE = Cache(path) + try: + self.TAGS_CACHE = Cache(path) + except sqlite3.OperationalError: + self.io.tool_error(f"Unable to use tags cache, delete {path} to resolve.") + self.TAGS_CACHE = dict() def save_tags_cache(self): pass