common-workflow-language / common-workflow-language/cwltool
Not indented namespace declaration error message is difficult to understand
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
```
$namespaces:
edam: http://edamontology.org/
```
instead of
```
$namespaces:
edam: http://edamontology.org/
```
Gives an unhelpful error message e.g.
```
I'm sorry, I couldn't load this CWL file.
The error was:
Traceback (most recent call last):
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/main.py", line 673, in main
metadata, uri, loadingContext)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/load_tool.py", line 346, in make_tool
tool = loadingContext.construct_tool_object(processobj, loadingContext)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/workflow.py", line 54, in default_make_tool
return Workflow(toolpath_object, loadingContext)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/workflow.py", line 531, in __init__
loadingContext.prov_obj))
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/workflow.py", line 565, in make_workflow_step
return WorkflowStep(toolpath_object, pos, loadingContext, parentworkflowProv)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/workflow.py", line 625, in __init__
toolpath_object["run"], loadingContext)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/load_tool.py", line 372, in load_tool
metadata=loadingContext.metadata)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/cwltool/load_tool.py", line 284, in validate_document
workflowobj, fileuri, checklinks=do_validate)
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/schema_salad/ref_resolver.py", line 859, in resolve_all
newctx.add_namespaces(document[u"$namespaces"])
File "/data/jbollema/git/vg-ecoli-cwl/venv/lib/python3.6/site-packages/schema_salad/ref_resolver.py", line 391, in add_namespaces
self.vocab.update(ns)
TypeError: 'NoneType' object is not iterable
```
Contributor guide
Assessment
This issue has not been assessed yet.