From 75ac883485fd436683572dc52d4fb8ab1b182de5 Mon Sep 17 00:00:00 2001 From: Robert Hammann Date: Sun, 13 Oct 2024 12:30:44 -0500 Subject: [PATCH] add more informative error msg --- alea/submitters/local.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alea/submitters/local.py b/alea/submitters/local.py index c7f6df3..78a494e 100644 --- a/alea/submitters/local.py +++ b/alea/submitters/local.py @@ -287,9 +287,13 @@ def _read_metadata(self, output_filename_pattern): metadata_list = get_metadata(output_filename_pattern) for m in metadata_list: m.pop("date", None) - if len(set([deterministic_hash(m) for m in metadata_list])) != 1: + n_metadata = len(set([deterministic_hash(m) for m in metadata_list])) + if n_metadata != 1: raise ValueError( - f"The metadata are not the same for all the {len(output_filename_list)} output!" + "The metadata for output_filename_pattern " + f"{output_filename_pattern} are not the same for all the " + f"{len(output_filename_list)} outputs " + f"({n_metadata} unique sets of metadata)!" ) metadata = metadata_list[0] if metadata["poi"] != self.poi: