common-workflow-language / common-workflow-language/cwltool

Typos in parameters give unhelpful errors

Open
#370 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

My workflow (snippet):
```
star:
run: ../tools/STAR.cwl
in:
index: index
fastq: [TUMOR_FASTQ_1, TUMOR_FASTQ_2]
out: [output]
```
The corresponding tool:
```
fastqs:
type:
type: array
items: File
inputBinding:
separate: true
prefix: --readFilesIn
```
Note how I input **fastq** instead of **fastqs**

The `cwl-runner` error:
```
Unexpected exception
Traceback (most recent call last):
File "/home/ubuntu/venvs/cwl/local/lib/python2.7/site-packages/cwltool/workflow.py", line 538, in job
**kwargs):
File "/home/ubuntu/venvs/cwl/local/lib/python2.7/site-packages/cwltool/draft2tool.py", line 245, in job
builder = self._init_job(joborder, **kwargs)
File "/home/ubuntu/venvs/cwl/local/lib/python2.7/site-packages/cwltool/process.py", line 436, in _init_job
fillInDefaults(self.tool[u"inputs"], builder.job)
File "/home/ubuntu/venvs/cwl/local/lib/python2.7/site-packages/cwltool/process.py", line 290, in fillInDefaults
elif shortname(inp[u"id"]) not in job and inp[u"type"][0] == u"null":
KeyError: 0
Workflow error, try again with --debug for more information:
0
```

Adding `--debug` gave no more information than this so it took me a while before I found the mistake. A more specific error would be very helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.