diff --git a/snakebids/core/input_generation.py b/snakebids/core/input_generation.py index 087502ca..d86a19a7 100644 --- a/snakebids/core/input_generation.py +++ b/snakebids/core/input_generation.py @@ -636,10 +636,12 @@ def _get_component( path = itx.one(paths) except ValueError as err: msg = ( - f"More than one snakemake filename for {input_name}, taking the " - f"first. To correct this, use the --filter_{input_name} option to " - f"narrow the search. Found filenames: {paths}" - ) + f"Multiple path templates for one component. Use --filter_{input_name} to " + f"narrow your search or --wildcards_{input_name} to make the template more " + "generic.\n" + f"\tcomponent = {input_name!r}\n" + f"\tpath_templates = [\n\t\t" + ",\n\t\t".join(map(repr, paths)) + "\n\t]\n" + ).expandtabs(4) raise ConfigError(msg) from err if filters.has_empty_postfilter: diff --git a/snakebids/paths/_factory.py b/snakebids/paths/_factory.py index 4661227f..85648a04 100644 --- a/snakebids/paths/_factory.py +++ b/snakebids/paths/_factory.py @@ -237,10 +237,9 @@ def bids( result = os.path.join(*path_parts) + tail if custom_parts and _implicit and not in_interactive_session(): wrn_msg = ( - f"Path generated with custom entities not part of the default BIDS " - "spec, and a spec has not been explicitly declared. This could break " - "when snakebids is upgraded, as the default spec can be updated " - "without warning, and these entities may be included in future specs.\n" + f"Path generated with unrecognized entities, and a snakebids spec has " + "not been explicitly declared. This could break in future snakebids " + "versions, as the default spec can be changed without warning.\n" f"\tpath = {result!r}\n" f"\tentities = {custom_parts!r}\n\n" "Please declare a spec using:\n"