rvalieris / parallel-fastq-dump

parallel fastq-dump wrapper
MIT License
265 stars 33 forks source link

AttributeError: 'module' object has no attribute 'TemporaryDirectory' #16

Closed royfrancis closed 6 years ago

royfrancis commented 6 years ago

Running parallel-fastq-dump 0.6.3 on Scientific Linux using sratools/2.8.2-1 and I get this error.

[rmf@r43 temp]$ parallel-fastq-dump --split-spot --split-files --gzip -s SRR390728 -t 8

SRR ids: ['SRR390728']
extra args: ['--split-spot', '--split-files', '--gzip']
Traceback (most recent call last):
  File "/home/rmf/.pyenv/versions/2.7.6/bin/parallel-fastq-dump", line 103, in <module>
    main()
  File "/home/rmf/.pyenv/versions/2.7.6/bin/parallel-fastq-dump", line 96, in main
    pfd(args, si, extra_args)
  File "/home/rmf/.pyenv/versions/2.7.6/bin/parallel-fastq-dump", line 12, in pfd
    tmp_dir = tempfile.TemporaryDirectory(prefix="pfd_",dir=args.tmpdir)
AttributeError: 'module' object has no attribute 'TemporaryDirectory'

I have also tried -s SRR390728 and -s ./SRR390728.sra because I do have the .sra file locally. But, I am not sure if it uses that.

rvalieris commented 6 years ago

hello, the problem is that TemporaryDirectory function only exists in python 3. can you use python3 instead of python2 ? also see https://github.com/rvalieris/parallel-fastq-dump/issues/9