[Tutor] The "No parsers found" error.

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sat Apr 26 18:43:01 2003

> This is a rather long post. The problem is related to a program (called
> GNUe-forms) that uses xml.sax and is unable to run because it can't find
> any XML parser.

Hi Adrian,

Ah, I remember that error message!

You may need to install a library or two to get a complete XML system.
For some reason, Python 2.2 doesn't come with a native parser, and depends
on an outside source to provide one.  (If you had the 'expat' C library,
Python can use that, but it requires a recompile of Python.)

To fix the problem, you'll probably want to grab PyXML:


PyXML provides a parser that will plug right into Python.

> My feeling is that the problem could be caused by some version
> incompatibility rather than a bug in that program. But I am a newbie and
> have never used xml.sax, so that i have no clue about how xml.sax is
> supposed to be used .

No prob; you're in the right place to ask.  *grin* The folks on the
XML-SIG mailing list may also be a good resource for help on this stuff:


> DB000:   File "/usr/local/gnue/lib/python/gnue/common/GParser.py",
>                line 89, in loadXMLObject
> DB000:     parser = xml.sax.make_parser()
> DB000:   File "/usr/local/lib/python2.2/xml/sax/__init__.py",
>                line 93, in make_parser
> DB000:     raise SAXReaderNotAvailable("No parsers found", None)
> DB000: xml.sax._exceptions.SAXReaderNotAvailable: No parsers found

Yeah, this is a common problem for newcomers to Python and XML.  It's a
little annoying; I hope that the situation is improved in Python 2.3...
Anyway, if you install the PyXML subsystem, that should fix the problem
for you.

Good luck to you!