pepkit / looper

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

Unclear error message with PEP without looper section #286

Closed afrendeiro closed 4 years ago

afrendeiro commented 4 years ago

If running looper run with a PEP without a looper section, looper throws an error that is hard to understand:

Traceback (most recent call last):
  File "//home/afr/.local/bin/looper", line 8, in <module>
    sys.exit(main())
  File "/home/afr/.local/lib/python3.8/site-packages/looper/looper.py", line 691, in main
    args = enrich_args_via_cfg(args, aux_parser)
  File "/home/afr/.local/lib/python3.8/site-packages/looper/utils.py", line 213, in enrich_args_via_cfg
    elif dest in cfg_args_all:
TypeError: argument of type 'NoneType' is not iterable

If a looper section is really required in the PEP, then a message stating that is absent should be presented.

stolarczyk commented 4 years ago

good catch, that's a bug.

The thing is, looper section is not really required -- you can provide the output_dir (and any other looper.X setting using the CLI). So for output_dir one can use --output-dir $HOME. But this is considered experimental, so we specify the looper section as required in the docs: http://looper.databio.org/en/latest/defining-a-project/

In your case none of the options to provide output_dir were used, which needs to be accommodated.