[Biopython] Entrez.read return value is typed as a string??

Peter biopython at maubp.freeserve.co.uk
Tue Oct 27 11:51:12 EDT 2009


On Tue, Oct 27, 2009 at 3:42 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Tue, Oct 27, 2009 at 3:12 PM, Ben O'Loghlin <bassbabyface at yahoo.com> wrote:
>> I'm trying to use Entrez to extract and manipulate records from PubMed, and
>> I'm stumped. I was expecting the return value of Entrez.read to be a
>> structured object, and instead it seems to return a string which would
>> require further parsing to do anything useful with.
>
> That doesn't sound right. The Bio.Entrez.read() should take a handle,
> in XML format, and return a nested collection of python objects.

I think I've worked out what you may have been doing wrong - trying
to feed HTML into Bio.Entrez.read(). I would have expected a helpful
error message, but it returns an empty string. I've filed Bug 2938.

http://bugzilla.open-bio.org/show_bug.cgi?id=2938

Michiel - could you take a look at this please?

Thanks,

Peter


More information about the Biopython mailing list