From e913958237d9aae5cb02079b0f1b03f4aaf7fcb3 Mon Sep 17 00:00:00 2001 From: Nick Harder <56074305+nick-harder@users.noreply.github.com> Date: Tue, 26 Sep 2023 09:02:47 +0200 Subject: [PATCH] -fix outputs queries (#207) small mistake prevents simulations from running when database is just created --- assume/common/outputs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assume/common/outputs.py b/assume/common/outputs.py index 61f47f3b..7d45f22c 100644 --- a/assume/common/outputs.py +++ b/assume/common/outputs.py @@ -357,11 +357,14 @@ async def on_stop(self): for query in queries: try: df = pd.read_sql(query, self.db) - except OperationalError: + except (OperationalError, ProgrammingError): continue dfs.append(df) + if not dfs: + return + df = pd.concat(dfs) df.reset_index() df["simulation"] = self.simulation_id