diff --git a/src/zenml/client.py b/src/zenml/client.py index 4b66dbe9a98..e57b41884a1 100644 --- a/src/zenml/client.py +++ b/src/zenml/client.py @@ -5391,11 +5391,15 @@ def _get_entity_by_id_or_name_or_prefix( # If more than one entity with the same name is found, raise an error. entity_label = get_method.__name__.replace("get_", "") + "s" + formatted_entity_items = [ + f"- {item.name}: (id: {item.id})\n" + for item in entity.items + ] raise ZenKeyError( f"{entity.total} {entity_label} have been found that have " f"a name that matches the provided " f"string '{name_id_or_prefix}':\n" - f"{[entity.items]}.\n" + f"{formatted_entity_items}.\n" f"Please use the id to uniquely identify " f"only one of the {entity_label}s." )