Skip to content

Commit

Permalink
better "debug" for error in command line usage
Browse files Browse the repository at this point in the history
it's sadly common to get not very helpful error messages when using
ilastik from the command line.
For me this often comes back to this error message complaining about
trailing file names.
It is absolutely not obvious what portion of the cmd is treated that way
so now we at least give a hint on what is interpreted incorrectly.

xref: #1830
  • Loading branch information
k-dominik committed Nov 3, 2023
1 parent 23b49e1 commit 1313128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ilastik/applets/dataSelection/dataSelectionApplet.py
Expand Up @@ -134,7 +134,8 @@ def __call__(self, parser, namespace, values, option_string):
if named_configured_roles:
raise ValueError(
"You can only have trailing file paths if no other role was set by name. "
f"You have set the following roles by name: {named_configured_roles}"
f"You have set the following roles by name: {named_configured_roles}. "
f"Trailing filenames {values}."
)
setattr(namespace, role_arg_names[0], values)

Expand Down

0 comments on commit 1313128

Please sign in to comment.