From ba09b9d4729d3f924359357b3adfdd190beb5d8e Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Sun, 31 Dec 2023 15:43:00 -0700 Subject: [PATCH] fixed bare except --- swarms/utils/apa.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swarms/utils/apa.py b/swarms/utils/apa.py index fa73b7b4..680f7e1c 100644 --- a/swarms/utils/apa.py +++ b/swarms/utils/apa.py @@ -108,7 +108,8 @@ class Action: def to_json(self): try: tool_output = json.loads(self.tool_output) - except: + except JSONDecodeError: + # print("Failed to decode JSON. Using raw output instead.") tool_output = self.tool_output return { "thought": self.thought,