Closed
Description
Expected Behavior
Workflow should run as I am using a packed.cwl file generated by cwltool --pack
command.
Actual Behavior
Error as follows:
../../cwltool.py 1.0.20170720184656
[provenance] Temporary research object: /var/folders/tl/1j6jy66x3nvfbxt8ycs_q21m0000gn/T/tmpLU5UWw
Resolved 'packed.cwl' to 'file:///Users/farahkhan/Desktop/cwltool/fred/workflow/packed.cwl'
I'm sorry, I couldn't load this CWL file. The error was:
Traceback (most recent call last):
File "/Users/farahkhan/Desktop/cwltool/cwltool/main.py", line 813, in main
args.ro.packed_workflow(print_pack(document_loader, processobj, uri, metadata))
File "/Users/farahkhan/Desktop/cwltool/cwltool/main.py", line 650, in print_pack
packed = pack(document_loader, processobj, uri, metadata)
File "/Users/farahkhan/Desktop/cwltool/cwltool/pack.py", line 144, in pack
v = rewrite[r]
Workflow Code
{
"cwlVersion": "v1.0",
"$schemas": [
"file:///Users/farahkhan/Desktop/cwltool/tests/wf/empty.ttl"
],
"$graph": [
{
"class": "Workflow",
"doc": "Reverse the lines in a document, then sort those lines.",
"hints": [
{
"class": "DockerRequirement",
"dockerPull": "debian:8"
}
],
"inputs": [
{
"type": "File",
"doc": "The input file to be processed.",
"default": {
"class": "File",
"location": "file:///Users/farahkhan/Desktop/cwltool/tests/wf/hello.txt"
},
"id": "#main/input"
},
{
"type": "boolean",
"default": true,
"doc": "If true, reverse (decending) sort",
"id": "#main/reverse_sort"
}
],
"outputs": [
{
"type": "File",
"outputSource": "#main/sorted/output",
"doc": "The output with the lines reversed and sorted.",
"id": "#main/output"
}
],
"steps": [
{
"in": [
{
"source": "#main/input",
"id": "#main/rev/input"
}
],
"out": [
"#main/rev/output"
],
"run": "#revtool.cwl",
"id": "#main/rev"
},
{
"in": [
{
"source": "#main/rev/output",
"id": "#main/sorted/input"
},
{
"source": "#main/reverse_sort",
"id": "#main/sorted/reverse"
}
],
"out": [
"#main/sorted/output"
],
"run": "#sorttool.cwl",
"id": "#main/sorted"
}
],
"id": "#main"
},
{
"class": "CommandLineTool",
"doc": "Reverse each line using the `rev` command",
"inputs": [
{
"type": "File",
"inputBinding": {},
"id": "#revtool.cwl/input"
}
],
"outputs": [
{
"type": "File",
"outputBinding": {
"glob": "output.txt"
},
"id": "#revtool.cwl/output"
}
],
"baseCommand": "rev",
"stdout": "output.txt",
"id": "#revtool.cwl"
},
{
"class": "CommandLineTool",
"doc": "Sort lines using the `sort` command",
"inputs": [
{
"id": "#sorttool.cwl/reverse",
"type": "boolean",
"inputBinding": {
"position": 1,
"prefix": "--reverse"
}
},
{
"id": "#sorttool.cwl/input",
"type": "File",
"inputBinding": {
"position": 2
}
}
],
"outputs": [
{
"id": "#sorttool.cwl/output",
"type": "File",
"outputBinding": {
"glob": "output.txt"
}
}
],
"baseCommand": "sort",
"stdout": "output.txt",
"id": "#sorttool.cwl"
}
]
}
Full Traceback
../../cwltool.py 1.0.20170720184656
Resolved 'packed.cwl' to 'file:///Users/farahkhan/Desktop/cwltool/fred/workflow/packed.cwl'
Tool definition failed initialization:
Tool file contains graph of multiple objects, must specify one of #main, #revtool.cwl, #sorttool.cwl
Traceback (most recent call last):
File "/Users/farahkhan/Desktop/cwltool/cwltool/main.py", line 832, in main
makeTool, make_tool_kwds)
File "/Users/farahkhan/Desktop/cwltool/cwltool/load_tool.py", line 239, in make_tool
urllib.parse.urldefrag(i["id"])[1] for i in resolveduri
WorkflowException: Tool file contains graph of multiple objects, must specify one of #main, #revtool.cwl, #sorttool.cwl
Your Environment
- cwltool version: 1.0.20170720184656
Metadata
Metadata
Assignees
Labels
No labels