XML Parser Trouble in Python 2.1

David Lees DavidLNoSpammy at raqia.com
Tue May 29 21:44:14 CEST 2001

I have the following Python code which works fine in ActiveState Python

import xml.dom.minidom

dom1=xml.dom.minidom.parseString("<myxml>Some junky data</myxml>")

However, when I try executing it on my RedHat Linux 7.1 system I get the
following error stack, which puzzles me.  I do not understand why some
of the error messages even refer to 'sax' parser, since I am using dom. 
And I am puzzled why I get any errors in the first place.

Thanks in advance.

David Lees

python dom-example2.py
Traceback (most recent call last):
  File "dom-example2.py", line 3, in ?
    dom1=xml.dom.minidom.parseString("<myxml>Some junky data</myxml>")
  File "/usr/local/python21/lib/python2.1/xml/dom/minidom.py", line 915,
in parseString
    return _doparse(pulldom.parseString, args, kwargs)
  File "/usr/local/python21/lib/python2.1/xml/dom/minidom.py", line 901,
in _doparse
    events = apply(func, args, kwargs)
  File "/usr/local/python21/lib/python2.1/xml/dom/pulldom.py", line 301,
in parseString
    parser = xml.sax.make_parser()
  File "/usr/local/python21/lib/python2.1/xml/sax/__init__.py", line 88,
in make_parser
    raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found

More information about the Python-list mailing list