[Tutor] The "No parsers found" error.

Adrian Maier am@fx.ro
Sat Apr 26 12:09:01 2003


Hello!

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. 

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 .

So:

I have come across a development suite called GNUe (GNU Enterprise).
It is written in python and has several components: Forms, Reports,
Designer. It is able to use several database engines. 

After installing gnue, i am now trying to see the examples it
comes with. The forms are stored in XML ( the file extension 
is gfd). When trying to run any of the samples it complains
about not finding any (xml) parser:

$ gnue-form  form.gfd

DB000: Traceback (most recent call last):
[...]
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


This is a part of the file that causes the exception:

.............  part of GParser.py  ............
def loadXMLObject(stream, handler, rootType, xmlFileType,
  initialize=1, attributes={}, initParameters={}):

  # Create a parser
  parser = xml.sax.make_parser()     # <-------line 89

  # Set up some namespace-related stuff for the parsers
  parser.setFeature(xml.sax.handler.feature_namespaces, 1)
..............................


A (very) quick look in the help() showed me that the function
make_parser expects a parameter (the list of the "available parsers"),
but i haven't been able to figure out what values should that list
contain ( ok: it's the list of the modules that provide parsers. But
which are those modules? )

Please tell me if you have any idea about what is wrong. Maybe I
have to install some additional modules?

I am using Python 2.2 built from sources on a Debian 2.2r5.


Thank you in advance for any hint you could provide,

Adrian Maier
(am@fx.ro)