[Biopython-dev] is there any problem with GenBank FeatureParser

Dinakar desas2 at excsrv38.mayo.edu
Wed Jul 17 17:22:39 EDT 2002


Hello:

I have installed biopython 1.04a  and python 2.2.1.
I am trying to go through tutorials and also tutorial from Pasteur
institute. In section of 3.4.1 they use GenBank FeatureParser. I tried to
use it and it gives lots of traceback. I would appreciate, if any of you
could help with this.
Thank you.

Dinakar




<code>




from Bio import GenBank
record_parser = GenBank.FeatureParser()
ncbi_dict = GenBank.NCBIDictionary(parser = record_parser)
gb_seqrecord = ncbi_dict['5595']
print gb_seqrecord
</code>
<traceback>
Traceback (most recent call last):
  File "./test_as.py", line 32, in ?
    gb_seqrecord = ncbi_dict['5595']
  File "/home/desas2/lib/python2.2/site-packages/Bio/GenBank/__init__.py",
line 1555, in __getitem__
    return self.parser.parse(handle)
  File "/home/desas2/lib/python2.2/site-packages/Bio/GenBank/__init__.py",
line 268, in parse
    self._scanner.feed(handle, self._consumer)
  File "/home/desas2/lib/python2.2/site-packages/Bio/GenBank/__init__.py",
line 1250, in feed
    self._parser.parseFile(handle)
  File "/home/desas2/lib/python2.2/site-packages/Martel/Parser.py", line
230, in parseFile
    self.parseString(fileobj.read())
  File "/home/desas2/lib/python2.2/site-packages/Martel/Parser.py", line
258, in parseString
    self._err_handler.fatalError(result)
  File "/home/desas2/lib/python2.2/xml/sax/handler.py", line 38, in
fatalError
    raise exception
Martel.Parser.ParserPositionException: error parsing at or beyond
character 55
</traceback>






More information about the Biopython-dev mailing list