From 88394c7d829c5e25be56f3efffbc9805b64736a5 Mon Sep 17 00:00:00 2001 From: mia Date: Wed, 20 Nov 2024 06:52:59 -0800 Subject: changes and alterations --- 3_archive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '3_archive.py') diff --git a/3_archive.py b/3_archive.py index 39affdd..258392b 100644 --- a/3_archive.py +++ b/3_archive.py @@ -74,7 +74,10 @@ def collect_note(id: str): output["attachments"] = [] for file_id in file_ids: time.sleep(0.0005) - name, type_, comment, url = conn.execute('select name, type, comment, url from drive_file where id = %s', [file_id]).fetchone() + row = conn.execute('select name, type, comment, url from drive_file where id = %s', [file_id]).fetchone() + if row is None: + continue + name, type_, comment, url = row attachment = { "id": file_id, "type": type_, -- cgit 1.4.1