[BioPython] retrieving GenBank files

Ravinder Singh Ravinder.Singh at colorado.edu
Wed May 7 17:03:06 EDT 2003


Hi,
Using this code to retireve a genbank file, I'm getting the following 
error. Any idea why is it not working? Of course, we would like to 
download a list of genbank files.
-------
from Bio import GenBank
gi_list = ['AE002603']
ncbi_dict = GenBank.NCBIDictionary()
gb_record = ncbi_dict[gi_list[0]]
print gb_record # or write to afiel
---------

(beagle)[3:52pm]>>python retrieve_gb.py
Traceback (most recent call last):
  File "retrieve_gb.py", line 6, in ?
    gb_record = ncbi_dict[gi_list[0]]
  File 
"/usr4/singh-lab/rsingh/local/lib/python/Bio/GenBank/__init__.py", line 
1552, in __getitem__
    raise KeyError, "I unexpectedly got back html-formatted data."
KeyError: I unexpectedly got back html-formatted data.

-- 
********************************************************************************
Dr. Ravinder Singh
Assistant Professor
MCD Biology
347 UCB
University of Colorado
Boulder, CO 80309-0347

(303)492-8886 (voice)
(303)492-7744 (fax)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pw600a.bioperl.org/pipermail/biopython/attachments/20030507/c08b4059/attachment.htm


More information about the BioPython mailing list