pepkit / looper

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

KeyError: '_cli_extra' #392

Closed nsheff closed 9 months ago

nsheff commented 1 year ago

Getting this error on an example for the dna methylation pipelines. I'm trying to track down the source now...

looper run examples/test_config.yaml
The Looper config specification through the PEP project is deprecated and will be removed in future versions. Please use the new running method by utilizing a looper config file. For more information: here is more information 
Config file does not have version key. Defaulting to 2.1.0
Looper version: 1.5.2-dev
Command: run
Using default config. No config found in env var: ['DIVCFG']
Config file does not have version key. Defaulting to 2.1.0
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
Not all environment variables were populated in derived attribute source: $CODE/microtest/data/{filename}
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 1125, in main
    p = Project(
  File "/home/nsheff/.local/lib/python3.8/site-packages/looper/project.py", line 118, in __init__
    setattr(self[EXTRA_KEY], attr_name, kwargs[attr_name])
  File "/home/nsheff/.local/lib/python3.8/site-packages/peppy/project.py", line 1365, in __getitem__
    return self._project_data[item]
KeyError: '_cli_extra'
nsheff commented 1 year ago

This is the error given when you have

pipeline_interfaces:
  sample: null

so I think it's an error message issue.

donaldcampbelljr commented 11 months ago

Tried to replicate this but get a reasonable error message:

Looper finished
Samples valid for job generation: 0 of 2
Commands submitted: 0 of 0
Jobs submitted: 0

1 unique reasons for submission failure: No pipeline interfaces defined

Summary of failures:
No pipeline interfaces defined: frog_1, frog_2
{'Pipestat compatible': False, 'Commands submitted': '0 of 0', 'Jobs submitted': 0, 
'No pipeline interfaces defined': 'frog_2'}

And it appears that self[EXTRA_KEY] will now exist as an empty dict, so it should not give a key error later in the code: https://github.com/pepkit/looper/blob/519a2db9aa6ea4823bce4c74f85d3397065be37a/looper/project.py#L117-L126