From dd033d408458b8c1e517101c4e9b05b7e481569b Mon Sep 17 00:00:00 2001 From: Martin <49105846+Fosowl@users.noreply.github.com> Date: Mon, 5 May 2025 19:00:49 +0200 Subject: [PATCH] Update sources/memory.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- sources/memory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/memory.py b/sources/memory.py index 6c76fdb..d5df812 100644 --- a/sources/memory.py +++ b/sources/memory.py @@ -118,13 +118,13 @@ class Memory(): json_memory = json.load(f) except FileNotFoundError: self.logger.warning(f"File not found: {path}") - return None + return {} except json.JSONDecodeError: self.logger.warning(f"Error decoding JSON from file: {path}") - return None + return {} except Exception as e: self.logger.warning(f"Error loading file {path}: {e}") - return None + return {} return json_memory def load_memory(self, agent_type: str = "casual_agent") -> None: