From 01fcadb5b0adf394967f3c419e4e1deb0857394e Mon Sep 17 00:00:00 2001 From: Gabriele Venturi Date: Tue, 6 Jun 2023 02:04:07 +0200 Subject: [PATCH] fix: fix cache tests (#232) --- pandasai/helpers/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandasai/helpers/cache.py b/pandasai/helpers/cache.py index d73e1e3ce..9c2f1ff37 100644 --- a/pandasai/helpers/cache.py +++ b/pandasai/helpers/cache.py @@ -60,5 +60,5 @@ def clear(self) -> None: def destroy(self) -> None: """Destroy the cache.""" - self.cache.close() - os.remove(self.filename + ".db") + if os.path.exists(self.filename + ".db"): + os.remove(self.filename + ".db")