pepkit / looper

A job submitter for Portable Encapsulated Projects
http://looper.databio.org
BSD 2-Clause "Simplified" License
20 stars 7 forks source link

bad error message #397

Closed nsheff closed 6 months ago

nsheff commented 11 months ago

I accidentally put the verbosity argument after the command and got this:

looper check --verbosity 5
This PEP configues looper through the project config. This approach is deprecated and will be removed in future versions. Please use a looper config file. For more information see looper.databio.org/en/latest/looper-config
Looper version: 1.5.2-dev
Command: check
Unrecognized arguments: --verbosity
Traceback (most recent call last):
  File "/home/nsheff/.local/bin/looper", line 8, in <module>
    sys.exit(main())
  File "/home/nsheff/.local/lib/python3.8/site-packages/looper/looper.py", line 1106, in main
    if is_registry_path(args.config_file):
  File "/home/nsheff/.local/lib/python3.8/site-packages/looper/utils.py", line 518, in is_registry_path
    if input_string.endswith(".yaml"):
AttributeError: 'int' object has no attribute 'endswith'

This is not a very helpful error. Instead, this should probably say something like this:

Malformed registry path. Unable to parse the string '5' as a registry path

That would have been much more helpful for me to realize what it was trying to do.

donaldcampbelljr commented 8 months ago

Added better error message.