[XML-SIG] expat missing in Sun Python?

Norman Samuelson nhs@llnl.gov
Fri, 13 Sep 2002 08:35:27 -0700


I have been working on an application that deals with XML files, converting 
text data to XML.  It uses the minidom, which I thought was part of 
standard Python distributions.  I developed the code on Windows, and I have 
had no trouble running it on Compaq or IBM flavors of Unix.  When I try to 
run it on our Sun machines, it fails.  The following two lines of Python 
code illustrate the problem:

import xml.dom.minidom as mdom
doc = mdom.parse('name of xml file goes here')

When parse is called on the Sun, I get the following retrace:

>Python 2.1.1 (#2, Nov  8 2001, 17:03:47)
>[GCC 2.95.2 19991024 (release)] on sunos5
>Type "copyright", "credits" or "license" for more information.
> >>> import xml.dom.minidom as mdom
> >>> doc = mdom.parse('/usr/gapps/cyclops/data/ale3d.ParamDescriptions.xml')
>Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File 
> "/usr/local/apps/python/python-2.1.1/lib/python2.1/xml/dom/minidom.py", 
> line 910, in parse
>     return _doparse(pulldom.parse, args, kwargs)
>   File 
> "/usr/local/apps/python/python-2.1.1/lib/python2.1/xml/dom/minidom.py", 
> line 901, in _doparse
>     events = apply(func, args, kwargs)
>   File 
> "/usr/local/apps/python/python-2.1.1/lib/python2.1/xml/dom/pulldom.py", 
> line 289, in parse
>     parser = xml.sax.make_parser()
>   File 
> "/usr/local/apps/python/python-2.1.1/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
> >>>

It appears that expat (or is it pyexpat) is missing.

I would appreciate it if someone could tell me where to find the missing 
piece, or a newer version that includes that missing piece.


- Norm -

Norman H. Samuelson                         nhs@llnl.gov
Lawrence Livermore National Lab      925-422-0661
P.O. Box 808, L-98
Livermore, CA 94551