From b7849911c85ca6ac5bd165b7a48ccce1a768f70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Gr=C3=B8hn=20Damgaard?= <54889907+bokajgd@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:57:11 +0100 Subject: [PATCH] fix: more explanation in error message Co-authored-by: Martin Bernstorff --- .../timeseriesflattener/feature_spec_objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/psycop_feature_generation/timeseriesflattener/feature_spec_objects.py b/src/psycop_feature_generation/timeseriesflattener/feature_spec_objects.py index 8b1996ae..ab61f8a1 100644 --- a/src/psycop_feature_generation/timeseriesflattener/feature_spec_objects.py +++ b/src/psycop_feature_generation/timeseriesflattener/feature_spec_objects.py @@ -273,7 +273,8 @@ def __init__(self, **data): if len(invalid_loaders) != 0: nl = "\n" # New line variable as f-string can't handle backslashes raise ValueError( - f"""Invalid loader(s) specified.{nl}{nl}Following loaders were not found in the data_loaders registry:""" + f"""Some loader strings could not be resolved in the data_loaders catalogue. Did you make a typo? If you want to add your own loaders to the catalogue, see explosion / catalogue on GitHub for info. + {nl*2}Loaders that could not be resolved:""" f"""{nl}{nl.join(str(loader) for loader in invalid_loaders)}{nl}{nl}""" f"""Available loaders:{nl}{nl.join(str(loader) for loader in data_loaders.get_all().keys())}""" )