[Biopython] Entrez and SeqIO "no records found in handle"
Peter Cock
p.j.a.cock at googlemail.com
Thu Feb 23 18:03:01 EST 2012
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
More information about the Biopython
mailing list