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

SoftwareRequirement fails if in a Python3 virtualenv

Open
#954 6 comments 0 reactions 1 assignee Claimed by @jmchilton View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

From https://www.biostars.org/p/344955/

## Expected Behavior
Tell us what should happen

## Actual Behavior
```
openjdk-8.0.12 100% |##############################################################| Time: 0:00:01 59.85 MB/s
rtg-tools-3.8. 100% |##############################################################| Time: 0:00:00 15.25 MB/s
Extracting packages ...
[ COMPLETE ]|#################################################################################| 100%
Linking packages ...
[ COMPLETE ]|#################################################################################| 100%
#
# To activate this environment, use:
# > source activate __rtg-tools@3.8.2
#
# To deactivate this environment, use:
# > source deactivate __rtg-tools@3.8.2
#

Exception while running job
Traceback (most recent call last):
File "/nethome/usevani/miniconda2/lib/python2.7/site-packages/cwltool/job.py", line 278, in _execute
name=self.name
File "/nethome/usevani/miniconda2/lib/python2.7/site-packages/cwltool/job.py", line 575, in _job_popen
mode="wb") as job_file:
ValueError: binary mode doesn't take an encoding argument
[job rtg.cwl] completed permanentFail
{}
Final process status is permanentFail
```

## Workflow Code
```
cwlVersion: v1.0
class: CommandLineTool
baseCommand: rtg

requirements:
EnvVarRequirement:
envDef:
TOIL_GRIDENGINE_PE: smp

hints:
SoftwareRequirement:
packages:
- package: 'rtg'
version:
- '3.8.2'
specs:
- https://anaconda.org/bioconda/rtg-tools

arguments:
- valueFrom: vcfeval
position: 2
- valueFrom: 20G
position: 1
prefix: RTG_MEM=
separate: false
- valueFrom: "$(runtime.outdir)/out"
prefix: -o
position: 3
- valueFrom: $(runtime.cores)
prefix: -T
position: 4

inputs:
rtg_reference:
type: Directory
inputBinding:
position: 5
prefix: -t
gold_standard:
type: File
inputBinding:
position: 6
prefix: -b
secondaryFiles:
- .tbi
doc: Genome-In-A-Bottle gold start VCF.
input:
type: File
inputBinding:
position: 7
prefix: -c
secondaryFiles:
- .tbi
doc: input compressed and index VCF
all_records:
type: boolean
inputBinding:
position: 8
prefix: --all-records
sample_names:
type: string
inputBinding:
prefix: --sample=
separate: false
position: 9
evaluation_regions:
type: File
inputBinding:
prefix: --evaluation-regions=
separate: false
position: 10

outputs:
output:
type: Directory
outputBinding:
glob: "$(runtime.outdir)/out"
```

## Full Traceback
```pytb
Paste the full traceback in case there is an exception
Run the workflow with ``--debug`` flag for more verbose logging
```

## Your Environment
* cwltool version: 1.0.20180809224403

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.