[Biopython-dev] NCBI DTD File

Lev Tsypin ltsypin at uchicago.edu
Fri Sep 4 19:16:17 UTC 2015


Hi Peter,

This is me trying to get protein sequences from the protein database. I
have a gi code in the variable 'gi' that I pass into the Entrez.efetch
function. Specifically, I use:

        handle = Entrez.efetch(db='protein', id=gi, retmode='xml')
        record = Entrez.read(handle)

Best,
Lev

On Fri, Sep 4, 2015 at 11:12 AM, Peter Cock <p.j.a.cock at googlemail.com>
wrote:

> Hi Lev,
>
> Which database was this with? Each has somewhat different XML behaviour./
>
> The NCBI have been quite good about versioning the DTD files -
> normally they add new files rather than edit an existing DTD file. So
> unless you've had a warning from Biopython there should be no reason
> to download a new DTD file.
>
> Peter
>
> On Fri, Sep 4, 2015 at 3:44 PM, Lev Tsypin <ltsypin at uchicago.edu> wrote:
> > Hi all,
> >
> > I am encountering this error when using Bio.Entrez:
> >
> > Bio.Entrez.Parser.ValidationError: Failed to find tag 'Error' in the
> DTD. To
> > skip all tags that are not represented in the DTD, please call
> > Bio.Entrez.read or Bio.Entrez.parse with validate=False.
> >
> > I've found a discussion of the same issue from about a year ago, so I
> figure
> > the the NCBI updated their DTD file in a strange way. I found several
> > solutions: would you recommend that I download the new DTD file into my
> > local copy of Biopython or run Entrez.read with validate=False?
> >
> > Best regards,
> > Lev Tsypin
> >
> > _______________________________________________
> > Biopython-dev mailing list
> > Biopython-dev at mailman.open-bio.org
> > http://mailman.open-bio.org/mailman/listinfo/biopython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20150904/966e0c31/attachment.html>


More information about the Biopython-dev mailing list