diff options
author | Frederick Muriuki Muriithi | 2024-03-19 15:13:15 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-03-19 15:13:15 +0300 |
commit | f22c423375487149f4f485d83c4a083f3ca0dbfd (patch) | |
tree | 24040e0e6f4ed06f444a314708e95fec5cf46ca8 /qc_app | |
parent | 38227b8e482ea10f8bb111a1a90f22f8f019e2ab (diff) | |
download | gn-uploader-f22c423375487149f4f485d83c4a083f3ca0dbfd.tar.gz |
Add debugging statements to track upload of R/qtl2 bundle.
Diffstat (limited to 'qc_app')
-rw-r--r-- | qc_app/upload/rqtl2.py | 4 |
1 files changed, 4 insertions, 0 deletions
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"] |