common-workflow-language / common-workflow-language/cwltool
Error with --outdir
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
When I run the command:
cwltool --cachedir workflow_cache --outdir workflow_output completeWorkflow.cwl input.yml
I get:
Unhandled error, try again with --debug for more information:
[Errno 2] No such file or directory: ''
Here's what I get with --debug:
Unhandled error, try again with --debug for more information:
[Errno 2] No such file or directory: ''
Traceback (most recent call last):
File "/home/mepstein/.local/lib/python2.7/site-packages/cwltool/main.py", line 721, in main
**vars(args))
File "/home/mepstein/.local/lib/python2.7/site-packages/cwltool/main.py", line 230, in single_job_executor
output_dirs, kwargs.get("move_outputs"))
File "/home/mepstein/.local/lib/python2.7/site-packages/cwltool/process.py", line 215, in relocateOutputs
stageFiles(pm, moveIt)
File "/home/mepstein/.local/lib/python2.7/site-packages/cwltool/process.py", line 176, in stageFiles
os.makedirs(os.path.dirname(p.target), 0755)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''
When I add some debugging print's to process.py, I see (just before the error):
MapperEnt(resolved='file:///home/mepstein/tmp/workflows/workflow_cache/9540f1f896b3ab1f435e83798bcf79f5', target='workflow_output', type='Directory')
so when it does os.path.dirname() on 'workflow_output', it's '', hence the error.
Is this a bug in cwltool?
Note that when I run the same command without --outdir, or I do a command like:
cwltool --cachedir /shared/mepstein/cachedir --outdir /shared/mepstein/workflow_output completeWorkflow.cwl input.yml
it works fine, there's no error.
Contributor guide
Assessment
This issue has not been assessed yet.