From f5204acfb8c3fa010ac33b5565b75f8004e4f741 Mon Sep 17 00:00:00 2001 From: PaoloBonettiPolimi <94172434+PaoloBonettiPolimi@users.noreply.github.com> Date: Thu, 2 May 2024 12:04:39 +0200 Subject: [PATCH 1/2] adding MPLCONFIGDIR path for matplotlib --- hawk/processes/wps_causal.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hawk/processes/wps_causal.py b/hawk/processes/wps_causal.py index b92d47b..22a335d 100644 --- a/hawk/processes/wps_causal.py +++ b/hawk/processes/wps_causal.py @@ -5,6 +5,8 @@ import logging import pandas as pd from hawk.analysis import CausalAnalysis +from pathlib import Path +import os LOGGER = logging.getLogger("PYWPS") @@ -234,6 +236,7 @@ def _handler(self, request, response): tefs_max_lag_target = int(request.inputs["tefs_max_lag_target"][0].data) workdir = Path(self.workdir) + os.environ['MPLCONFIGDIR'] = os.path.join(workdir, "/matplotlib") if not tefs_use_contemporary_features and tefs_max_lag_features == 0: raise ValueError("You cannot use no lag features and not use contemporary features in TEFS.") From c1c38284bc28b9e217d83ba94887853dd0729a12 Mon Sep 17 00:00:00 2001 From: PaoloBonettiPolimi <94172434+PaoloBonettiPolimi@users.noreply.github.com> Date: Thu, 2 May 2024 12:07:01 +0200 Subject: [PATCH 2/2] delete double import --- hawk/processes/wps_causal.py | 1 - 1 file changed, 1 deletion(-) diff --git a/hawk/processes/wps_causal.py b/hawk/processes/wps_causal.py index 22a335d..feeb5a7 100644 --- a/hawk/processes/wps_causal.py +++ b/hawk/processes/wps_causal.py @@ -5,7 +5,6 @@ import logging import pandas as pd from hawk.analysis import CausalAnalysis -from pathlib import Path import os LOGGER = logging.getLogger("PYWPS")