aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/templates/mapping_error.html39
-rw-r--r--wqflask/wqflask/views.py4
2 files changed, 27 insertions, 16 deletions
diff --git a/wqflask/wqflask/templates/mapping_error.html b/wqflask/wqflask/templates/mapping_error.html
index 884d4df8..963bf7d6 100644
--- a/wqflask/wqflask/templates/mapping_error.html
+++ b/wqflask/wqflask/templates/mapping_error.html
@@ -1,20 +1,31 @@
-{% extends "base.html" %}
-{% block title %}Error{% endblock %}
-{% block content %}
+{%extends "base.html"%}
+{%block titl%}Error{%endblock%}
+{%block content%}
<!-- Start of body -->
- {{ header("An error occurred during mapping") }}
+{{ header("An error occurred during mapping") }}
- <div class="container">
- <h3>
- <p>There is likely an issue with the genotype file associated with this group/RISet. Please contact Zach Sloan (zachary.a.sloan@gmail.com) or Arthur Centeno (acenteno@gmail.com) about the data set in question.</p>
- </h3>
- <br>
- <h3>
- <p>Try mapping using interval mapping instead; some genotype files with many columns of NAs have issues with GEMMA or R/qtl.</p>
- </h3>
- </div>
+<div class="container">
+ <h3>
+ {%if error:%}
+ <p>
+ The following error was raised<br /><br />
+ &nbsp;&nbsp;&nbsp;&nbsp;{{error.args[0]}}<br /><br />
+ </p>
+ <p>
+ Please contact Zach Sloan (zachary.a.sloan@gmail.com) or Arthur Centeno
+ (acenteno@gmail.com) about the error.
+ </p>
+ {%else:%}
+ <p>There is likely an issue with the genotype file associated with this group/RISet. Please contact Zach Sloan (zachary.a.sloan@gmail.com) or Arthur Centeno (acenteno@gmail.com) about the data set in question.</p>
+ </h3>
+ <br>
+ <h3>
+ <p>Try mapping using interval mapping instead; some genotype files with many columns of NAs have issues with GEMMA or R/qtl.</p>
+ {%endif%}
+ </h3>
+</div>
<!-- End of body -->
-{% endblock %}
+{%endblock%}
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 223b8507..ee0cd582 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -722,8 +722,8 @@ def mapping_results_page():
if template_vars.no_results:
rendered_template = render_template("mapping_error.html")
return rendered_template
- except:
- rendered_template = render_template("mapping_error.html")
+ except FileNotFoundError as fnfe:
+ rendered_template = render_template("mapping_error.html", error=fnfe)
return rendered_template
if not template_vars.pair_scan: