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

ExpressionTool cannot return one of its input files as an output

Đang mở
#248 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
376
Fork
255
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
12

Mô tả

I found some advice in https://github.com/common-workflow-language/common-workflow-language/issues/235 but it fails when trying to put into practice with cwltool.

The simple ExpressionTool in [this gist](https://gist.github.com/dleehr/4c72a5a70e4a59f80f453c0379f52aab) tries to add secondaryFiles to a file, but the execution fails because cwltool tries to copy the source file over itself, and python raises an exception:

```
Error: `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` and `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` are the same file
```

Full logs:

```
$ cwltool merge-secondary-files.cwl merge.json
/Users/dcl9/Code/yaml/bespin-cwl/env/bin/cwltool 1.0.20161202203310
Resolved 'merge-secondary-files.cwl' to 'file:///Users/dcl9/Code/yaml/bespin-cwl/tools/merge-secondary-files.cwl'
Final process status is success
Unhandled error, try again with --debug for more information:
`/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` and `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` are the same file
(env)Homer15:tools dcl9 (master)$ cwltool --debug merge-secondary-files.cwl merge.json
/Users/dcl9/Code/yaml/bespin-cwl/env/bin/cwltool 1.0.20161202203310
Resolved 'merge-secondary-files.cwl' to 'file:///Users/dcl9/Code/yaml/bespin-cwl/tools/merge-secondary-files.cwl'
Final process status is success
Copying /Users/dcl9/Code/yaml/bespin-cwl/tools/primary to /Users/dcl9/Code/yaml/bespin-cwl/tools/primary
Unhandled error, try again with --debug for more information:
`/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` and `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` are the same file
Traceback (most recent call last):
File "/Users/dcl9/Code/yaml/bespin-cwl/env/lib/python2.7/site-packages/cwltool/main.py", line 721, in main
**vars(args))
File "/Users/dcl9/Code/yaml/bespin-cwl/env/lib/python2.7/site-packages/cwltool/main.py", line 246, in single_job_executor
output_dirs, kwargs.get("move_outputs"))
File "/Users/dcl9/Code/yaml/bespin-cwl/env/lib/python2.7/site-packages/cwltool/process.py", line 216, in relocateOutputs
stageFiles(pm, moveIt)
File "/Users/dcl9/Code/yaml/bespin-cwl/env/lib/python2.7/site-packages/cwltool/process.py", line 179, in stageFiles
stageFunc(p.resolved, p.target)
File "/Users/dcl9/Code/yaml/bespin-cwl/env/lib/python2.7/site-packages/cwltool/process.py", line 211, in moveIt
shutil.copy(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 69, in copyfile
raise Error("`%s` and `%s` are the same file" % (src, dst))
Error: `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` and `/Users/dcl9/Code/yaml/bespin-cwl/tools/primary` are the same file
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.