[Biopython] Entrez.efetch issue with the returning data type

Anna Kostikova anna.kostikova at gmail.com
Tue Feb 28 13:28:50 UTC 2012


Dear list,

Since today I've started to have an issue with Entrez.efetch utility,
and in particular with the rettype parameter. Essentially, the format
of the data returned when I specify
Entrez.efetch(db='nucleotide',id='JQ042818.1',rettype='gb') does not
correspond anymore to a genbank datatype. Few days ago all was fine.
What is going on?

the script is:
from Bio import Entrez
Entrez.email = 'my.email at domain.com'

local_file=open("test.gb", 'w')
try:
        handle =
Entrez.efetch(db='nucleotide',id='JQ042818.1',rettype='gb') #download
record with Entrez.efetch
        local_file.write(handle.read()) #write to a file
        handle.close()
except:
        print "Accsession id is not found"
local_file.close()

Thanks a lot for your ideas,
Anna



More information about the Biopython mailing list