[Biopython-dev] [Bug 1946] New: Parsing GenBank Files - ParserPositionException:

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Fri Feb 3 21:23:26 EST 2006


http://bugzilla.open-bio.org/show_bug.cgi?id=1946

           Summary: Parsing GenBank Files - ParserPositionException:
           Product: Biopython
           Version: Not Applicable
          Platform: Macintosh
        OS/Version: Mac OS
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Martel/Mindy
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: julius.lucks at gmail.com


Parsing a genbank file with the following code
(BioPython version 1.41 installed with fink on python 2.3 on OS X):

from Bio import GenBank
feature_parser = GenBank.FeatureParser()
gb_record = feature_parser.parse(open('bug.gb','r'))

I get a trace:
Traceback (most recent call last):
  File "bug.py", line 11, in ?
    gb_record = feature_parser.parse(open(gb_file,'r'))
  File "/sw/lib/python2.3/site-packages/Bio/GenBank/__init__.py", line 219, in
parse
    self._scanner.feed(handle, self._consumer)
  File "/sw/lib/python2.3/site-packages/Bio/GenBank/__init__.py", line 1259, in
feed
    self._parser.parseFile(handle)
  File "/sw/lib/python2.3/site-packages/Martel/Parser.py", line 328, in
parseFile
    self.parseString(fileobj.read())
  File "/sw/lib/python2.3/site-packages/Martel/Parser.py", line 356, in
parseString
    self._err_handler.fatalError(result)
  File "/sw/lib/python2.3/xml/sax/handler.py", line 38, in fatalError
    raise exception
Martel.Parser.ParserPositionException: error parsing at or beyond character 196


The contents of bug.gb are:
LOCUS       NC_001416              48502 bp    DNA     linear   PHG 08-DEC-2005
DEFINITION  Enterobacteria phage lambda, complete genome.
ACCESSION   NC_001416
VERSION     NC_001416.1  GI:9626243
PROJECT     GenomeProject:14204
KEYWORDS    .
.. (Truncated)

If I remove the PROJECT line, the bug is fixed.  This seems to be an uncommon
tag in GenBank files, so I am not sure if the parser takes this into account.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list