From d7f4ebb09f2a0ded742f284998607acd84f594f5 Mon Sep 17 00:00:00 2001 From: lukas leufen <l.leufen@fz-juelich.de> Date: Mon, 9 Mar 2020 17:03:26 +0100 Subject: [PATCH] added history check --- src/run_modules/pre_processing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run_modules/pre_processing.py b/src/run_modules/pre_processing.py index 3263f5c4..1d014c9e 100644 --- a/src/run_modules/pre_processing.py +++ b/src/run_modules/pre_processing.py @@ -137,9 +137,10 @@ class PreProcessing(RunEnvironment): for station in all_stations: t_inner.run() try: - # (history, label) = data_gen[station] data = data_gen.get_data_generator(key=station, load_local_tmp_storage=load_tmp, save_local_tmp_storage=save_tmp) + if data.history is None: + raise AttributeError valid_stations.append(station) logging.debug(f'{station}: history_shape = {data.history.transpose("datetime", "window", "Stations", "variables").shape}') logging.debug(f"{station}: loading time = {t_inner}") -- GitLab