pepkit / looper

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

If the `.looper` file points to a non-existent file, it gives this error message. #266

Closed nsheff closed 4 years ago

nsheff commented 4 years ago

If the .looper file points to a non-existent file, it gives this error message.

[ns5bc@udc-ba36-36:~/code/glass_aml_rrbs] looper run -d -l 1 No project config defined, using: /home/nsheff/code/glass_aml_rrbs/metadata/glass_aml_rrbs_config.yaml. R ead from dotfile (/sfs/qumulo/qhome/ns5bc/code/glass_aml_rrbs/.looper.yaml). Traceback (most recent call last): File "/home/ns5bc/.local/bin/looper", line 10, in sys.exit(main()) File "/home/ns5bc/.local/lib/python3.6/site-packages/looper/looper.py", line 690, in main args = enrich_args_via_cfg(args, aux_parser) File "/home/ns5bc/.local/lib/python3.6/site-packages/looper/utils.py", line 211, in enrich_args_via_cfg elif dest in cfg_args_all: TypeError: argument of type 'NoneType' is not iterable

Instead it should give a meaningful error message showign the problem.

Originally posted by @nsheff in https://github.com/pepkit/looper/issues/262#issuecomment-631537795

stolarczyk commented 4 years ago

ok, so changing None to dict() in 203 would help I guess

nsheff commented 4 years ago

yes -- then it says:

OSError: Project config file path does not exist: ...

nsheff commented 4 years ago

Related: DO you think we should make the .looper file accept env vars?

Otherwise, it doesn't make sense to put a .looper file in a git repo.

nsheff commented 4 years ago

actually -- even better, it should just use a relative path!

so if we say looper init x, it should identify the relative path to config and use that. right now it's sticking in an absolute path