enasequence / enaBrowserTools

A collection of scripts to assist in the retrieval of data from the ENA Browser
Apache License 2.0
74 stars 15 forks source link

minor fix to avoid escaping the colon character in the url #47

Closed harryhaemin closed 4 years ago

harryhaemin commented 4 years ago

I ran into a bug while attempting to downloading with Aspera where the command to urlparse.quote(file_url) was escaping the colon (':') in the url and replacing it with "%3A" - for example if the url I was trying to download a file from was fasp.sra.ebi.ac.uk:/vol1/fastq/ERR172/002/ERR1729192/ERR1729192.fastq.gz, after the call to the function, it would change to fasp.sra.ebi.ac.uk%3A/vol1/fastq/ERR172/002/ERR1729192/ERR1729192.fastq.gz, thus resulting in download failures. I think the colon is pretty specific to the Aspera urls, so perhaps this bug wasn't caught before. I just added the colon as a "safe" character as per the Python documentation on the function, and I hope it doesn't break with other potential urls that are beyond my use case.

josieburgin commented 4 years ago

Hi, this bug should be fixed in the most recent release. Thanks!