[Biopython-dev] [Bug 1773] New: Martel.Parser.ParserPositionException

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Tue Apr 26 06:35:59 EDT 2005


           Summary: Martel.Parser.ParserPositionException
           Product: Biopython
           Version: Not Applicable
          Platform: PC
               URL: http://portal.open-bio.org/pipermail/biopython/2005-
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Martel/Mindy
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: marc.saric at gmx.de

I tried to index the the following Genbank file with this simple script
(as described in the cookbook) but it failed with the following traceback.

The file can be found in:


including all features (SNP, CDD, MGC, HPRD, STS)

I tried with Biopython 1.3, Biopython 1.4b and the Biopython-CVS as of

The program

#!/usr/bin/env python
from Bio import GenBank

dict_file = "ba000018_s_aureus_n315_genome.gb"
index_file = "ba000018_s_aureus_n315_genome.idx"

GenBank.index_file(dict_file, index_file)

The Traceback:

Traceback (most recent call last):
  File "/home/saric/data/devel/workspace/scripts/hitman/index_gb.py",
line 37, in ?
    GenBank.index_file(dict_file, index_file) # FIXME: This breaks with
the N315 S.aureus-genome
line 1283, in index_file
    SimpleSeqRecord.create_flatdb([filename], indexname, indexer)
line 152, in create_flatdb
    creator.load(filename, builder = builder, fileid_info = {})
line 52, in load
    for record in iterator.iterate(source, cont_handler = builder):
line 71, in iterateFile
    raise Parser.ParserPositionException(self.start_position)
Martel.Parser.ParserPositionException: error parsing at or beyond
character 5887615


I use a x86-machine running SuSE-Linux 9.1 (kernel 2.6.5-7.147-default,
gcc version 3.3.3).

The error is most likely due to a trainling blank line in the GenBank-file,
which is there for all "official" downloads I checked (see my post on the
Biopython-mailinglist (link above)).

Either this is a bug in GenBank (delivering invalid files) or something minor in
the Martel-Parser, which does not like blank lines at the end of the file.

------- 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