From 8ae15011b9978bf9bdc14fca9df7d297617c813f Mon Sep 17 00:00:00 2001 From: rakow Date: Tue, 23 Jul 2024 08:07:08 +0200 Subject: [PATCH] fix error in existing directory --- matsim/calibration/run_simulations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/matsim/calibration/run_simulations.py b/matsim/calibration/run_simulations.py index 2d51a94..38dbdaa 100644 --- a/matsim/calibration/run_simulations.py +++ b/matsim/calibration/run_simulations.py @@ -159,8 +159,7 @@ def run(jar: Union[str, os.PathLike], if worker_id >= workers: raise ValueError("Worker ID must be smaller than number of workers (starts at 0).") - if not os.path.exists("eval-runs"): - makedirs("eval-runs") + makedirs("eval-runs", exist_ok=True) for i in range(runs): if i % workers != worker_id: