common-workflow-language / common-workflow-language/cwltool
Traceback with a workflow with only cwlVersion, class, and empty inputs and outputs
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
I am writing workflows for the [initial sections of the user guide](https://github.com/common-workflow-language/user_guide/pull/226), trying to find the simplest workflow possible to run and validate (Java anecdote: an empty `Test.java` file is a valid Java file and can be used with `javac`, being the simplest Java file).
An `IndexError` traceback was raised for the following workflow:
```cwl
cwlVersion: v1.2
class: CommandLineTool
inputs: []
outputs: []
```
```bash
(venv) kinow@ranma:~/Development/python/workspace/user_guide$ cwltool /tmp/wf.cwl
INFO /home/kinow/Development/python/workspace/user_guide/venv/bin/cwltool 3.1.20220406080846
INFO Resolved '/tmp/wf.cwl' to 'file:///tmp/wf.cwl'
INFO [job wf.cwl] /tmp/wf0urglt$
ERROR Exception while running job
Traceback (most recent call last):
File "/home/kinow/Development/python/workspace/user_guide/venv/lib/python3.9/site-packages/cwltool/job.py", line 348, in _execute
rcode = _job_popen(
File "/home/kinow/Development/python/workspace/user_guide/venv/lib/python3.9/site-packages/cwltool/job.py", line 986, in _job_popen
sproc = subprocess.Popen(
File "/home/kinow/Development/python/miniconda3/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/kinow/Development/python/miniconda3/lib/python3.9/subprocess.py", line 1691, in _execute_child
executable = args[0]
IndexError: list index out of range
WARNING [job wf.cwl] completed permanentFail
{}
WARNING Final process status is permanentFail
```
## Expected Behavior
A better error message (assuming this is not a valid CWL Workflow).
## Actual Behavior
A traceback.
## Workflow Code
```
cwlVersion: v1.2
class: CommandLineTool
inputs: []
outputs: []
```
## Full Traceback
```pytb
INFO /home/kinow/Development/python/workspace/user_guide/venv/bin/cwltool 3.1.20220406080846
INFO Resolved '/tmp/wf.cwl' to 'file:///tmp/wf.cwl'
DEBUG Parsed job order from command line: {
"id": "/tmp/wf.cwl"
}
DEBUG [job wf.cwl] initializing from file:///tmp/wf.cwl
DEBUG [job wf.cwl] {}
DEBUG [job wf.cwl] path mappings is {}
DEBUG [job wf.cwl] command line bindings is []
DEBUG [job wf.cwl] initial work dir {}
INFO [job wf.cwl] /tmp/vuvihs02$
ERROR Exception while running job
Traceback (most recent call last):
File "/home/kinow/Development/python/workspace/user_guide/venv/lib/python3.9/site-packages/cwltool/job.py", line 348, in _execute
rcode = _job_popen(
File "/home/kinow/Development/python/workspace/user_guide/venv/lib/python3.9/site-packages/cwltool/job.py", line 986, in _job_popen
sproc = subprocess.Popen(
File "/home/kinow/Development/python/miniconda3/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/kinow/Development/python/miniconda3/lib/python3.9/subprocess.py", line 1691, in _execute_child
executable = args[0]
IndexError: list index out of range
WARNING [job wf.cwl] completed permanentFail
DEBUG [job wf.cwl] outputs {}
DEBUG [job wf.cwl] Removing input staging directory /tmp/1c33c7tl
DEBUG [job wf.cwl] Removing temporary directory /tmp/wbvodmo6
DEBUG Removing intermediate output directory /tmp/vuvihs02
{}
WARNING Final process status is permanentFail
```
## Your Environment
* cwltool version: cwltool 3.1.20220406080846
Check using ``cwltool --version``
Contributor guide
Assessment
This issue has not been assessed yet.