add try/except statement to catch graphviz error
@@ -16,6 +16,7 @@ import copy
import concurrent.futures
import datetime as dt
+import graphviz
import matplotlib.pyplot as plt
import pygments
import pygments.lexers
@@ -161,7 +162,13 @@ class EOExecutor:
LOGGER.info('No display found, using non-interactive Agg backend')
plt.switch_backend('Agg')
+ try:
dependency_graph = self._create_dependency_graph()
+ except graphviz.backend.ExecutableNotFound as ex:
+ dependency_graph = None
+ warnings.warn("{}.\nPlease install the system package 'graphviz' (in addition "
+ "to the python package) to have the dependency graph in the final report!".format(ex),
+ Warning, stacklevel=2)
task_descriptions = self._get_task_descriptions()
