Skip to content

Commit

Permalink
adding MPLCONFIGDIR path for matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
PaoloBonettiPolimi authored May 2, 2024
1 parent 99dd774 commit f5204ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hawk/processes/wps_causal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit f5204ac

Please sign in to comment.