Getting a curl: (22) The requested URL returned error: 500 ERROR
1
2
Entering edit mode
21 months ago
schlogl ▴ 160

Hi dear friends

I am trying to use a list of assemblies (one by line) to download some data from ncbi. Example of the list:

GCA_937921735.1
GCA_937897655.1
GCA_902386345.1
GCA_902386385.1
GCA_902386595.1

I am using this command (that I think Genomax suggested a time ago in another post) and this command always worked very fine. However, today I am frustrated because I am getting this message error (in two different conda enviroments).

The command:

cat list_assm | while read -r acc ; do
    esearch -db assembly -query $acc </dev/null \
        | esummary \
        | xtract -pattern DocumentSummary -element FtpPath_GenBank \
        | while read -r url ; do
            fname=$(echo $url | grep -o 'GCA_.*' | sed 's/$/_genomic.fna.gz/') ;
            wget -nc "$url/$fname" ;
        done ;
    done

The message error:

EMPTY RESULT
LAST ATTEMPT
curl: (22) The requested URL returned error: 500
 ERROR:  curl command failed ( qua 22 fev 2023 07:07:46 -03 ) with: 22
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi -d retmax=0&usehistory=y&db=assembly&term=GCA_019056805.1&tool=edirect&edirect=16.2&edirect_os=Linux&email=paulosschlogl%40psschlogl
HTTP/1.1 500 Internal Server Error

I know that the data it is there and I can download them manually. So Any of the friends have any tip for solving this?

Thank you a lot by your time.

Paulo

OBS: I will check it out for some error the the e-direct command, however, as I said it never fails before.

ncbi • 2.2k views
ADD COMMENT
1
Entering edit mode
21 months ago

the url works on my side. A temporary error IMHO.

$ wget -q  -O - "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?retmax=0&usehistory=y&db=assembly&term=GCA_019056805.1&tool=edirect&edirect=16.2&edirect_os=Linux&email=paulosschlogl%40psschlogl" | xmllint --format -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
<eSearchResult>
  <Count>1</Count>
  <RetMax>0</RetMax>
  <RetStart>0</RetStart>
  <QueryKey>1</QueryKey>
  <WebEnv>MCID_63f5f75de73c2319036cda4b</WebEnv>
  <IdList/>
  <TranslationSet/>
  <TranslationStack>
    <TermSet>
      <Term>GCA_019056805.1[All Fields]</Term>
      <Field>All Fields</Field>
      <Count>1</Count>
      <Explode>N</Explode>
    </TermSet>
    <OP>GROUP</OP>
  </TranslationStack>
  <QueryTranslation>GCA_019056805.1[All Fields]</QueryTranslation>
</eSearchResult>
ADD COMMENT
0
Entering edit mode

I think it was...working fine now. Thank you

ADD REPLY
0
Entering edit mode

Friends It seems that it was a temporary error in NCBI database. The code now ir working fine. Thank you.

ADD REPLY

Login before adding your answer.

Traffic: 2565 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6