diff --git a/mlair/data_handler/default_data_handler.py b/mlair/data_handler/default_data_handler.py index 03858f8ba0e72bfdb186711757e94bcc08680301..687bdd8899a07a57cae0ae85e066cd4ad1ad099e 100644 --- a/mlair/data_handler/default_data_handler.py +++ b/mlair/data_handler/default_data_handler.py @@ -370,6 +370,6 @@ def f_proc(data_handler, station, return_strategy="", tmp_path=None, **sp_keys): return res, station else: _tmp_file = os.path.join(tmp_path, f"{station}_{'%032x' % random.getrandbits(128)}.pickle") - with open(os.path.join(tmp_path, _tmp_file), "wb") as f: + with open(_tmp_file, "wb") as f: dill.dump(res, f) return _tmp_file, station diff --git a/mlair/run_modules/pre_processing.py b/mlair/run_modules/pre_processing.py index e3793651d99bf1229de4114a43c260ae534c9e37..a46a57bd31adf6edb3b683773b84dd9f52d79262 100644 --- a/mlair/run_modules/pre_processing.py +++ b/mlair/run_modules/pre_processing.py @@ -324,7 +324,7 @@ class PreProcessing(RunEnvironment): def f_proc(data_handler, station, name_affix, store, return_strategy="", tmp_path=None, **kwargs): """ Try to create a data handler for given arguments. If build fails, this station does not fulfil all requirements and - therefore f_proc will return None as indication. On a successfull build, f_proc returns the built data handler and + therefore f_proc will return None as indication. On a successful build, f_proc returns the built data handler and the station that was used. This function must be implemented globally to work together with multiprocessing. """ assert return_strategy in ["result", "reference"] @@ -342,7 +342,7 @@ def f_proc(data_handler, station, name_affix, store, return_strategy="", tmp_pat if tmp_path is None: tmp_path = os.getcwd() _tmp_file = os.path.join(tmp_path, f"{station}_{'%032x' % random.getrandbits(128)}.pickle") - with open(os.path.join(tmp_path, _tmp_file), "wb") as f: + with open(_tmp_file, "wb") as f: dill.dump(res, f) return _tmp_file, station