[BioPython] AttributeError: 'module' object has no attribute 'parse'
richa
richa at musc.edu
Tue Jun 12 15:24:23 EDT 2007
Compiled from source and the no more error messages. Thank you all for
your help and advise.
-Adam Richards (richa)
Christof Winter wrote:
> richa wrote:
>> Hi all,
>>
>> Just installed biopython on ubuntu feisty. Dependencies and package
>> seemed to install without a problem. Many of the test files that
>> come with it work fine, but the SeqIO object runs into a problem.
>> For example, the following code causes an error saying that the
>> 'module' object has no attribute 'parse'.
>>
>> Is this a problem of syntax or is it an installation issue?
>>
>> from Bio import SeqIO
>> handle = open("ls_orchid.fasta", "rU")
>> for record in SeqIO.parse(handle, "fasta") :
>> print record.id
>
> Dear richa:
>
> It is an installation issue. I got exactly the same error. I am
> running Debian Linux with the python-biopython package installed:
>
> $ dpkg -l | grep biopython
> ii python-biopython 1.42-2
>
> After upgrading to the newest version with
> $ sudo apt-get install python-biopython
>
> $ dpkg -l | grep biopython
> ii python-biopython 1.43-1
>
> the error is gone!
>
> By the way: this was the content of my old Bio/SeqIO/__init__.py:
>
> """Sequence input/output designed to look similar to the bioperl design.
>
> At present, these are all hand written. I would like to have
> autogenerated parsers in the futures, esp. with the ability to parse
> only subsets of the data, and to support event generated parsers.
>
> Note that once a parser is given an input string, it is free to read
> as much of the data as it wants to read, unless otherwise mentioned.
> """
>
> Nothing more. Now it matches the newest version as posted by Peter.
>
> Cheers,
> Christof
>
More information about the BioPython
mailing list