[Biopython-dev] [Biopython - Bug #3361] RE: Error finding lineage info for an organism

redmine at redmine.open-bio.org redmine at redmine.open-bio.org
Fri Jun 1 11:41:24 UTC 2012


Issue #3361 has been updated by Peter Cock.


This is an NCBI problem, hopefully a temporary one.

Unfortunately the NCBI Entrez API's error handling sucks, and differs in behaviour depending on the database. Rather than using an HTTP error code which would be nice and explicit, this is what is happening in your case:

>>> handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml")
>>> print handle.read()
<?xml version="1.0"?>
<!DOCTYPE TaxaSet PUBLIC "-//NLM//DTD Taxon, 14th January 2002//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/taxon.dtd">
<TaxaSet> Error occurred: connection-errorRead from backend beTaxonomy_Info failed: timeout. Url : http%3A%2F%2F130.14.18.23%2FTaxonomy%2Fbackend%2Fgettax.cgi%3Fncbi_sid%3D08DD0F4DFC8A9991%255F0034SID%26ncbi_phid%3DCE890B47FC8A938100000000003A951A%26myncbi_id%3D0%26port%3Dlive
</TaxaSet>

i.e. They appear to have dumped a plain text error message inside the XML.
----------------------------------------
Bug #3361: RE: Error finding lineage info for an organism
https://redmine.open-bio.org/issues/3361

Author: James-Alex Matthews
Status: New
Priority: Immediate
Assignee: Biopython Dev Mailing List
Category: Main Distribution
Target version: Not Applicable
URL: 


Though I've successfully used the tool many time, the following code now generates an empty list:

handle = Entrez.efetch(db = "Taxonomy", id = tax_id, retmode = "xml")   #Query taxonomy database with taxon id
lineage_record = Entrez.read(handle)    #Read out handle
>> Problem: Record is empty

I've even run the example code from the Biopython tutorial/cookbook:
handle = Entrez.efetch(db="Taxonomy", id="158330", retmode="xml")
records = Entrez.read(handle)
>> Same problem: Record is empty

Yelp!!!!!!


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org




More information about the Biopython-dev mailing list