[BioPython] script to extract records from nucleotide database

Peter biopython at maubp.freeserve.co.uk
Tue Nov 13 22:59:43 UTC 2007


Christof Winter wrote:
> Matthew Abravanel wrote:
>> Hi Christof,
>>
>> I tried out the code you sent me just to see if it would work but I get an
>> attribute error or something? Here is the error I get:
>>
>> Traceback (most recent call last):
>>   File "./run", line 3, in ?
>>     from Bio import GenBank
>>   File "/usr/pkg/lib/python2.4/site-packages/Bio/GenBank/__init__.py", line
>> 47, in ?
>>   File "/usr/pkg/lib/python2.4/site-packages/Bio/GenBank/Scanner.py", line
>> 20, in ?
>>     from Bio.SeqRecord import SeqRecord
>>   File "/usr/pkg/lib/python2.4/site-packages/Bio/SeqRecord.py", line 11, in
>> ?
>>   File "/usr/pkg/lib/python2.4/site-packages/Bio/FormatIO.py", line 55, in
>> __init__
>> AttributeError: 'module' object has no attribute 'formats'
> 
> Hi Matthew,
> 
> your import of the GenBank module fails. Most likely your BioPython installation 
> is broken. Could you try to re-install it?

What version of Biopython do you have Matthew? I'm pretty sure it isn't 
the latest Biopython 1.44, it must be Biopython 1.43 or older... but 
even on Biopython 1.43 doing "from Bio import GenBank" should work.

Odd.  What OS are you using, and how and where did you install Biopython?

Peter




More information about the Biopython mailing list