[BioPython] problem with GenBank.NCBIDictionary ?
Catherine Letondal
letondal@pasteur.fr
Fri, 31 May 2002 19:57:04 +0200
Cath Lawrence wrote:
> On Wednesday, May 29, 2002, at 02:25 AM, Catherine Letondal wrote:
> > If I change the parser to be either the GenBank.RecordParser or the
> > GenBank.FeatureParser
> > as shown in the tutorial, I get a Martel error message.
> ...
> > Martel.Parser.ParserPositionException: error parsing at or beyond
> > character 55
> > Could someone help?
>
> Yup, I had this when I started with BioPython last month.
>
> This is the LOCUS line change (it doesn't like seeing "linear").
> Grab the latest version from CVS and it should be fine.
The latest version from Bio/GenBank/__init__.py ? I have downloaded
the latest CVS version, but I still get exactly the same error as soon as
I try to use either the GenBank.RecordParser() or the GenBank.FeatureParser() ??
gb_dict = GenBank.NCBIDictionary(parser = GenBank.RecordParser())
gb_record = gb_dict['180255']
Traceback (most recent call last):
File "exemples/gb_refs.py", line 56, in ?
gb_rec = search_gbrec(ref)
File "exemples/gb_refs.py", line 48, in search_gbrec
gb_record = gb_dict[gi_list[0]]
File "/local/lib/python2.2/site-packages/Bio/GenBank/__init__.py", line 1557, in __getitem__
return self.parser.parse(handle)
File "/local/lib/python2.2/site-packages/Bio/GenBank/__init__.py", line 289, in parse
self._scanner.feed(handle, self._consumer)
File "/local/lib/python2.2/site-packages/Bio/GenBank/__init__.py", line 1252, in feed
self._parser.parseFile(handle)
File "/local/lib/python2.2/site-packages/Martel/Parser.py", line 230, in parseFile
self.parseString(fileobj.read())
File "/local/lib/python2.2/site-packages/Martel/Parser.py", line 258, in parseString
self._err_handler.fatalError(result)
File "/local/lib/python2.2/xml/sax/handler.py", line 38, in fatalError
raise exception
Martel.Parser.ParserPositionException: error parsing at or beyond character 55
(although:
gb_dict = GenBank.NCBIDictionary()
gb_record = gb_dict['180255']
works perfectly)
Or do you mean the latest version of Martel/Parser.py? (since the error seamed
to be more at this step). I have also downloaded the latest version, but
in this case, I get another error:
Traceback (most recent call last):
File "exemples/gb_refs.py", line 4, in ?
from Bio import GenBank
File "/local/lib/python2.2/site-packages/Bio/GenBank/__init__.py", line 53, in ?
import Martel
File "/local/lib/python2.2/site-packages/Martel/__init__.py", line 6, in ?
import Expression
File "/local/lib/python2.2/site-packages/Martel/Expression.py", line 31, in ?
import Parser
File "/local/lib/python2.2/site-packages/Martel/Parser.py", line 40, in ?
import Dispatch
ImportError: No module named Dispatch
>>>
Thanks for any help,
--
Catherine Letondal -- Pasteur Institute Computing Center