[Biopython-dev] Parsing efetch results from the Journals database through Bio.Entrez

Peter biopython at maubp.freeserve.co.uk
Mon Sep 20 06:09:54 EDT 2010


On Fri, Sep 3, 2010 at 6:26 PM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> Hi everybody,
>
> The parser in Bio.Entrez can parse any XML returned by the Entrez E-utilities
> as long as the corresponding DTD is available ...
> The advantage of removing these hacks is that it will allow us to validate all
> XML against the DTD, and to raise an error (if the user requests so) if any
> elements are found in the XML that don't validate against the DTD.

Hi Michiel,

All the tests look fine but there is a deprecation warning from your new
exception classes (I'm running it with Python 2.6 on the Mac):

$ python test_Entrez.py
Test error handling when presented with Fasta non-XML data ...
/Library/Python/2.6/site-packages/Bio/Entrez/Parser.py:114:
DeprecationWarning: BaseException.message has been deprecated as of
Python 2.6
  self.message = message
ok
Test error handling when presented with GenBank non-XML data ... ok
Test parsing XML returned by EFetch, Nucleotide database (first test) ... ok
Test parsing XML returned by EFetch, Protein database ... ok
Test parsing XML returned by EFetch, OMIM database ... ok
Test parsing XML returned by EFetch, PubMed database (first test) ... ok
Test parsing XML returned by EFetch, PubMed database (second test) ... ok
Test parsing XML returned by EFetch, Taxonomy database ... ok
Test parsing XML output returned by EGQuery (first test) ... ok
Test parsing XML output returned by EGQuery (second test) ... ok
Test if corrupted XML is handled correctly ...
/Library/Python/2.6/site-packages/Bio/Entrez/Parser.py:121:
DeprecationWarning: BaseException.message has been deprecated as of
Python 2.6
  self.message = message
ok


Peter


More information about the Biopython-dev mailing list