From d766dda24920324e1812de49e2fc0451d28df419 Mon Sep 17 00:00:00 2001 From: Michael <m.langguth@fz-juelich.de> Date: Wed, 19 May 2021 08:10:20 +0200 Subject: [PATCH] Some fixes in error-handling of config_preprocess_step1.py. --- .../utils/runscript_generator/config_preprocess_step1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video_prediction_tools/utils/runscript_generator/config_preprocess_step1.py b/video_prediction_tools/utils/runscript_generator/config_preprocess_step1.py index a1aa0dba..51d3de9f 100755 --- a/video_prediction_tools/utils/runscript_generator/config_preprocess_step1.py +++ b/video_prediction_tools/utils/runscript_generator/config_preprocess_step1.py @@ -247,13 +247,13 @@ class Config_Preprocess1(Config_runscript_base): if not status: inds_bad = [i for i, e in enumerate(check_vars) if e] # np.where(~np.array(check_vars))[0] if not silent: - print("%{0}: The following comma-separated elements are unknown variables:".format(method_name)) + print("%{0}: The following comma-separated elements are unknown variables:".format(method)) for ind in inds_bad: print(vars_list[ind]) return status if not (len(check_vars) == Config_Preprocess1.nvars or len(check_vars) == 1): - if not silent: print("%{0}: Unexpected number of variables passed.".method(method)) + if not silent: print("%{0}: Unexpected number of variables passed ({1} vs. {2}).".format(method, len(check_vars), Config_Preprocess1.nvars)) status = False return status -- GitLab