[Pythonmac-SIG] xml.dom.minidom error w/ python 2.2.1 as framework

christopher ariza ariza@flexatone.com
Thu, 25 Jul 2002 12:32:11 -0400 (EDT)


just discovered a problem when trying to parse a xml string (or file)
using xml.dom.minidom. this problem only emerges when using macho-python
installed as a framework. the problem does _not_ happen when using a
normal unix (via fink) python, nor when using MacPython. anything im
missing?


### MacPython 2.2.1 on OSX------------------------------------

Python 2.2.1 (#134, Apr  9 2002, 21:16:52)  [CW CARBON GUSI2 THREADS GC]
on mac
Type "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom
>>> doc = xml.dom.minidom.parseString("<doc>my document.</doc>")
>>> doc
<xml.dom.minidom.Document instance at 0x01b814e0>

### unix python 2.2-------------------------------------------

Python 2.2 (#1, Apr 17 2002, 16:11:12)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom
>>> doc = xml.dom.minidom.parseString("<doc>my document.</doc>")
>>> doc
<xml.dom.minidom.Document instance at 0x6a7170>

### framework installation of macho-python 2.2.1--------------

Python 2.2.1 (#1, Jul 25 2002, 11:24:12)
[GCC 2.95.2 19991024 (release)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom
>>> doc = xml.dom.minidom.parseString("<doc>my document.</doc>")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/xml/dom/minidom.py",
line 967, in parseString
    return _doparse(pulldom.parseString, args, kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/xml/dom/minidom.py",
line 953, in _doparse
    events = apply(func, args, kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/xml/dom/pulldom.py",
line 340, in parseString
    parser = xml.sax.make_parser()
  File
"/Library/Frameworks/Python.framework/Versions/2.2/lib/python2.2/xml/sax/__init__.py",
line 93, in make_parser
    raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found