aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-04-06 13:27:23 +0300
committerFrederick Muriuki Muriithi2023-04-06 13:27:23 +0300
commit753493121177d92221e199b9f1ca9f35b50f3556 (patch)
tree96124bb479820b29c341dc938097bd1580cf0f3c /wqflask
parentee81db0981dba12bc306b52d3cfa583ff35d36ec (diff)
downloadgenenetwork2-753493121177d92221e199b9f1ca9f35b50f3556.tar.gz
correlations: Provide more output to enable debug of errors.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/correlation_error_page.html5
-rw-r--r--wqflask/wqflask/views.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/wqflask/wqflask/templates/correlation_error_page.html b/wqflask/wqflask/templates/correlation_error_page.html
index 9197e4a9..7d11daf0 100644
--- a/wqflask/wqflask/templates/correlation_error_page.html
+++ b/wqflask/wqflask/templates/correlation_error_page.html
@@ -14,5 +14,10 @@
<div class="container">
<h3 style="color: red;">{{error["error-type"]}}</h3>
<p>{{error["error-message"]}}</p>
+ <p style="background-color: black; color: green;">
+ {%for line in error["stderr-output"]%}
+ {{line}}<br />
+ {%endfor%}
+ </p>
</div>
{%endblock%}
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index c71ae3c3..69576cc4 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -902,10 +902,14 @@ def corr_compute_page():
if jobs.completed_erroneously(job):
try:
- ## The "parseable" error report is actually in STDOUT
- output = json.loads(job.get("stdout") or "{}")
+ error_output = {
+ "error-type": "ComputeError",
+ "error-message": "There was an error computing the correlations",
+ **json.loads(job.get("stdout") or "{}"),
+ "stderr-output": job.get("stderr", "").split("\n")
+ }
return render_template(
- "correlation_error_page.html", error=output)
+ "correlation_error_page.html", error=error_output)
except json.decoder.JSONDecodeError as jde:
raise Exception(f"STDOUT: {job.get('stdout')}") from jde