From fb41caf7c5e86264515e5d9f39ebfb6c824de6bb Mon Sep 17 00:00:00 2001 From: vangef Date: Wed, 1 Mar 2023 00:43:34 +0000 Subject: [PATCH] added Exception - caused by WinError, trailing space in file name (without ext) --- utils/extractor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/extractor.py b/utils/extractor.py index c9bf902..66622d4 100644 --- a/utils/extractor.py +++ b/utils/extractor.py @@ -24,6 +24,8 @@ def extract_zip(zip_file, target_dir): zip_ref.close() except zipfile.BadZipfile as e: mark_file_as_BAD(zip_file, e) + except Exception as e: + print(f'[ERROR] Something went wrong while extracting zip contents. Check the error message, get student id and download / organise manually\nError message: {e}') def extract_rar(rar_file, target_dir):