[Biopython] Entrez and SeqIO "no records found in handle"
A M Torres, Hugo
mnemonico at posthocergopropterhoc.net
Tue Mar 6 23:39:13 UTC 2012
This one bit me while following the cookbook tonight.
Explicitly setting retmode= 'xml' or 'html' fails.
I think I read somewhere that 'text' is expected to break every now and
then. Seems its the only retmode option that remains functional.
--
.''`. Hugo A. M. Torres
: :' :
`. `' “Talk is cheap,
`- show me the code. ” -- L. Torvalds.
2012/2/23 Peter Cock <p.j.a.cock at googlemail.com>
> 2012/2/23 高凤(Feng GAO) <fenggao0907 at yahoo.com.cn>:
> > Hi all,
> > We have some python code using gi number to get record from Genbank.
> > Part of the code is:
> >
> > handle = Entrez.efetch(db="protein", id=ID, rettype="gb")
> > record = SeqIO.read(handle,"genbank")
> >
> > We have had no problem with this code
> > until this week when we started getting "ValueError: No records found
> in handle".
> > Anyone have an idea how to fix it now? Thanks!
> > Feng
>
> Try using an explicit retmode="text" in the efetch call.
> The NCBI changed the defaults with EFetch 2.0, which
> went live earlier this month. You're probably getting
> XML back instead.
>
> Note to self: I wonder if the Biopython tutorial examples
> need to be updated as well...
>
> Peter
>
>
> _______________________________________________
> Biopython mailing list - Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>
>
More information about the Biopython
mailing list