aboutsummaryrefslogtreecommitdiff
path: root/qc_app/upload/rqtl2.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/upload/rqtl2.py')
-rw-r--r--qc_app/upload/rqtl2.py4
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"]