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

enaDataGet download giving HTTP Error 400 error #66

Open awitney opened 3 years ago

awitney commented 3 years ago

enaDataGet is giving an error, is there a known issue?

$ enaDataGet NC_000962
Traceback (most recent call last):
  File "/homes/homedirs8/awitney/miniconda3/envs/data-download/bin/enaDataGet.py", line 89, in <module>
    elif not utils.is_available(accession):
  File "/homes/homedirs8/awitney/miniconda3/envs/data-download/bin/utils.py", line 240, in is_available
    response = urlrequest.urlopen(url)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/homedirs8/awitney/miniconda3/envs/data-download/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400:
ERROR: Something unexpected went wrong please try again.
If problem persists, please contact datasubs@ebi.ac.uk for assistance, with the above error details.
blackadder901 commented 3 years ago

I am also experiencing the same issue. I am trying to run the command both locally and in HPC but I am getting the same error.

mweberr commented 2 years ago

I have the same problem wondering what is the reason ?

suranjayathilaka commented 2 years ago

Hi! Could you please provide examples of the command that's failing?

awitney commented 2 years ago

This one is filing with the latest version

python enaBrowserTools-1.1.0/python3/enaDataGet.py ERR221663

although the error is now

urllib.error.URLError: <urlopen error [SSL: NO_CIPHERS_AVAILABLE] no ciphers available (_ssl.c:997)>

Manishemblebi commented 2 years ago

Hi @awitney , It seems like above error occurred due to handshake failure for SSL for python installed on client machine. Please run the "Install Certificates.command" as suggested under readme and try again.

Also, please verify if below URL are accessible on the client machine -
ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR221/ERR221663/ERR221663_1.fastq.gz

Thanks

awitney commented 1 year ago

Hi, just coming back to this as enaDataGet still not working for me. Isn't "Install Certificates.command" a command on a Mac installation? I am running centos. Yes i can access that file from the machine. Thanks

cpaysan122 commented 9 months ago

I have the same problem wondering what is the reason ?

enaDataGet -f fastq SRX15831808

Command exit status: 1

Command output: Checking availability of https://www.ebi.ac.uk/ena/browser/api/xml/SRX15831808

Command error: Traceback (most recent call last): File "/NetScratch/PLPOP/cpaysan/SRA_chlamydomonas_2024/bin/enaDataGet.py", line 116, in readGet.download_files(accession, output_format, dest_dir, fetch_index, fetch_meta, aspera) File "/NetScratch/PLPOP/cpaysan/SRA_chlamydomonas_2024/bin/readGet.py", line 93, in download_files lines = utils.download_report_from_portal(search_url) File "/NetScratch/PLPOP/cpaysan/SRA_chlamydomonas_2024/bin/utils.py", line 489, in download_report_from_portal response = get_report_from_portal(url) File "/NetScratch/PLPOP/cpaysan/SRA_chlamydomonas_2024/bin/utils.py", line 476, in get_report_from_portal response = urlrequest.urlopen(request, context=gcontext) File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(args) File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(args) File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: ERROR: Something unexpected went wrong please try again. If problem persists, please contact ENA (https://www.ebi.ac.uk/ena/browser/support) for assistance, with the above error details.

ctuni commented 6 months ago

I'm also having the same issue with every accession that I try (the ones from the documentation themselves are failing as well). Running enaBroserTool on an HPC cluster installed with easybuild, the error happens on both available versions of the tool (1.5.4 and 1.6).

cpaysan122 commented 6 months ago

I used this tool instead : fastq-dl (https://github.com/rpetit3/fastq-dl)

Christine Paysant - Le Roux Equipe Genomic Networks (Gnet) Paris-Saclay Institute of Plant Sciences (IPS2) UMR 1403 INRA-CNRS-UPSud-UP7-UEVE bâtiment 630 Plateau du moulon rue Noetzlin CS 80004 91192 GIF SUR YVETTE Cedex

http://www.ips2.u-psud.fr bureau 1.82 (33) 1 69 15 75 89


De : Cristina Tuñí i Domínguez @.***> Envoyé : lundi 3 juin 2024 11:53:38 À : enasequence/enaBrowserTools Cc : Christine Paysant-Le-Roux; Comment Objet : Re: [enasequence/enaBrowserTools] enaDataGet download giving HTTP Error 400 error (Issue #66)

I'm also having the same issue with every accession that I try (the ones from the documentation themselves are failing as well). Running enaBroserTool on an HPC cluster installed with easybuild, the error happens on both available versions of the tool (1.5.4 and 1.6).

— Reply to this email directly, view it on GitHubhttps://github.com/enasequence/enaBrowserTools/issues/66#issuecomment-2144648026, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5WKI624HY6FWJYBAJSSSCLZFQVJFAVCNFSM5I246IWKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGQ3DIOBQGI3A. You are receiving this because you commented.Message ID: @.***>

ctuni commented 6 months ago

I did not know about this other tool, it looks promising! For anyone interested, I ended up using this other tool: https://github.com/enasequence/ena-ftp-downloader