From 49fd2b7a6e7017fb6f9dae710553f454096714c1 Mon Sep 17 00:00:00 2001 From: aiooss-anssi Date: Tue, 16 Jan 2024 15:37:58 +0100 Subject: [PATCH] webapp/database.py: show message on eve.json loading error --- webapp/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/database.py b/webapp/database.py index 3fb87b4..f5b60ed 100644 --- a/webapp/database.py +++ b/webapp/database.py @@ -264,7 +264,8 @@ async def fill_database(self): break try: await load_event(self.con, line) - except (AttributeError, aiosqlite.OperationalError): + except (AttributeError, aiosqlite.OperationalError) as e: + print(f"Partial or malformed eve.json, retrying: {e}", flush=True) break # eve.json ends with a partial JSON eve_idx += len(line) line_count += 1