From f22c423375487149f4f485d83c4a083f3ca0dbfd Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 19 Mar 2024 15:13:15 +0300 Subject: Add debugging statements to track upload of R/qtl2 bundle. --- qc_app/upload/rqtl2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py index d42780f..c05f675 100644 --- a/qc_app/upload/rqtl2.py +++ b/qc_app/upload/rqtl2.py @@ -1,6 +1,7 @@ """Module to handle uploading of R/qtl2 bundles.""" import sys import json +import traceback from pathlib import Path from datetime import date from uuid import UUID, uuid4 @@ -156,9 +157,11 @@ def upload_rqtl2_bundle(species_id: int, population_id: int): population=population) try: + app.logger.debug("Files in the form: %s", request.files) the_file = save_file(request.files["rqtl2_bundle_file"], Path(app.config["UPLOAD_FOLDER"])) except AssertionError: + app.logger.debug(traceback.format_exc()) flash("Please provide a valid R/qtl2 zip bundle.", "alert-error error-rqtl2") return redirect(url_for("upload.rqtl2.upload_rqtl2_bundle", @@ -166,6 +169,7 @@ def upload_rqtl2_bundle(species_id: int, population_id: int): population_id=population_id)) if not is_zipfile(str(the_file)): + app.logger.debug("The file is not a zip file.") raise __RequestError__("Invalid file! Expected a zip file.") redisuri = app.config["REDIS_URL"] -- cgit v1.2.3