[Biopython] Bio/Entrez/efetch: Getting HTTP Error 500 Bio/Entrez/efetch: Getting HTTP Error 500 Bio/Entrez/efetch: Getting HTTP Error 500

Peter Cock p.j.a.cock at googlemail.com
Fri Feb 17 13:36:13 UTC 2012


On Fri, Feb 17, 2012 at 1:14 PM, Matej Repič <Matej.Repic at ki.si> wrote:
> Fortunately, the fix is quite simple:
>
> Substitute the id=idlist in you fetch line with id=",".join(idlist).
>

Hi Matej,

Well spotted. The idea is that this call,

Entrez.efetch(db="pubmed", id=['22307645', '22303114', '22301129',
'22299544', '22298842'], rettype="medline", retmode="text")

accesses this URL (where I have removed the email entry) which used to work
but isn't following the letter of the specification:

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?retmode=text&tool=biopython&db=pubmed&id=22307645&id=22303114&id=22301129&id=22299544&id=22298842&rettype=medline

Whereas this call:

h = Entrez.efetch(db="pubmed",
id="22307645,22303114,22301129,22299544,22298842", rettype="medline",
retmode="text")

actually uses a different URL (which the NCBI would approve of):

http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?retmode=text&tool=biopython&db=pubmed&id=22307645%2C22303114%2C22301129%2C22299544%2C22298842&rettype=medline

It is possible the NCBI may opt to "fix" this, but it looks like it was only
working in the past by accident. However, we can do the conversion inside
the Bio.Entrez.efetch function in future - we're due for another Biopython
release now anyway so you shouldn't have to wait too long.

I'm having general errors from the Entrez server right now - so I can't confirm
the problem or test the potential fix yet.

Peter




More information about the Biopython mailing list