[BioPython] 'Unexpected end of stream' while parsing blast results

Michael Fieseler michael.fieseler at math.uni-muenster.de
Fri Jun 3 11:55:26 EDT 2005


Hi,

while trying to parse output from local blast I encountered the following 
error:

Traceback (most recent call last):
  File "./extracthits.py", line 34, in ?
    b_record = b_parser.parse(blast_out);
  File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIStandalone.py", line 
610, inparse
    self._scanner.feed(handle, self._consumer)
  File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIStandalone.py", line 
93, in feed
    read_and_call_until(uhandle, consumer.noevent, contains='BLAST')
  File "/usr/lib/python2.4/site-packages/Bio/ParserSupport.py", line 335, in 
read_and_call_until
    line = safe_readline(uhandle)
  File "/usr/lib/python2.4/site-packages/Bio/ParserSupport.py", line 411, in 
safe_readline
    raise SyntaxError, "Unexpected end of stream."
SyntaxError: Unexpected end of stream.
 

The code I used is from the biopython tutorial and cookbook:

from Bio.Blast import NCBIStandalone
blast_out = open('18.blast','r')
b_parser = NCBIStandalone.BlastParser()
b_record = b_parser.parse(blast_out)

The software I am using is:
python 2.4.1
biopython 1.40b
blastall 2.2.10

Is there any solution to this? 

Regards,

Michael


More information about the BioPython mailing list