PyXML unable to make_parser twice

Mr Man the_mr_man26 at hotmail.com
Thu Nov 28 13:48:38 EST 2002


Hi - I'm unsure if this is the correct newsgroup to post to - feel
free to direct me to a more appropriate on if necessary.

I am using PyXML 0.8.1-1 with Python 2.1.1 - with it I am unable to
call make_parser twice like so

me at akira:/usr/lib/python2.1> python
Python 2.1.1 (#1, Sep 24 2001, 05:28:47)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import xml.sax as sax
>>> import xml.sax.saxutils as saxutils
>>> p = sax.sax2exts.make_parser()
>>> p2 = sax.sax2exts.make_parser()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "xml/sax/sax2exts.py", line 37, in make_parser
    return XMLParserFactory.make_parser(parser_list)
  File "xml/sax/saxexts.py", line 64, in make_parser
    return self._create_parser(parser_name)
  File "xml/sax/saxexts.py", line 43, in _create_parser
    return drv_module.create_parser()
  File "xml/sax/saxexts.py", line 74, in _create_parser
    raise _exceptions.SAXReaderNotAvailable
TypeError: __init__() takes at least 2 arguments (1 given)
>>>


Now obviously - I need to free something or other in between creating
the first one - and creating the second one - but I am not sure what.

Thanks for listening
Paul..



More information about the Python-list mailing list