[BioPython] Problem parsing genbank file

Andrew Nunberg anunberg at oriongenomics.com
Fri Mar 19 13:29:51 EST 2004


I just updated from cvs and got this error when trying to parse a genbank
file that had mutliple genbank files in it, I got this error :
Traceback (most recent call last):
  File "/loginhome/anunberg/bin/bac_hits.py", line 239, in ?
    main()
  File "/loginhome/anunberg/bin/bac_hits.py", line 98, in main
    seq_record = iterator.next()# go through each record
  File "/compbio/lib/python/Bio/GenBank/__init__.py", line 130, in next
    return self._parser.parse(File.StringHandle(data))
  File "/compbio/lib/python/Bio/GenBank/__init__.py", line 220, in parse
    self._scanner.feed(handle, self._consumer)
  File "/compbio/lib/python/Bio/GenBank/__init__.py", line 1248, in feed
    self._parser.parseFile(handle)
  File "/compbio/lib/python/Martel/Parser.py", line 328, in parseFile
    self.parseString(fileobj.read())
  File "/compbio/lib/python/Martel/Parser.py", line 356, in parseString
    self._err_handler.fatalError(result)
  File "/usr/local/lib/python2.3/xml/sax/handler.py", line 38, in fatalError
    raise exception
Martel.Parser.ParserPositionException: error parsing at or beyond character
20805


The parser seems to work if the genbank file only has one record

I will suggest it again, PLEASE PLEASE PLEASE tag the code in cvs so I can
revert to stable versions easily.
I am now using biopython regularly and I am on a bit of schedule for some of
this work.  Updating code is fine however tagging it will save some
headaches..


-- 
Andrew Nunberg
Bioinformagician
Orion Genomics
(314)-615-6989
www.oriongenomics.com




More information about the BioPython mailing list