[Zope] Me too: unable to create a SAX parser under Linux

Holger Blasum holger@blasum.net
Wed, 27 Mar 2002 13:05:18 +0100


Hello Benjamin,

I only reproduced (but not fixed) the problem. 
My only contribution (that corroborates
that the python included in the binaries is not complete) is the 
confirmation that zope's python 2.1 behaves different than the non-zope python 2.1:

zope python 2.1.2 (from http://www.zope.org/Products/Zope/2.5.0/Zope-2.5.0-linux2-x86.tgz, broken):

promitheas:~# Zope-2.5.0-linux2-x86/bin/python
Python 2.1.2 (#1, Jan 25 2002, 13:17:56) 
[GCC 2.7.2.3] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from xml.sax import *
>>> make_parser()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/root/Zope-2.5.0-linux2-x86/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

normal python 2.1.2 (ok):

blasum@promitheas:~$ python
Python 2.1.2 (#1, Mar 16 2002, 00:56:55) 
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from xml.sax import *
>>> make_parser()
<xml.sax.expatreader.ExpatParser instance at 0x808ca3c>

Correspondingly, xml.sax also runs fine under zope when doing a standard install from the current 'unstable' Debian GNU/Linux distro.    

On Mon, Mar 25, 2002 at 03:13:12PM +0100, Benjamin Buffereau wrote:
> I have a problem with the Expat parser (which is the default XML SAX parser)
> *specific to the Linux distribution of Zope* (everything works well under
> Windows). It seems that contrary to the Windows distribution, the Linux
> distribution doesn't include Expat.
> 
> I downloaded Zope-2.5.0-linux2-x86.tgz and followed the installation procedure.
> I created the following "useExpat2.py" external method:
> 
> import sys
> from xml.sax import make_parser
> def useExpat2():
> 	make_parser()
> 	return "Expat parser created"
> 
> Then I called this external method from a DMTL method called "foo": <dtml-var
> useExpat2>
> 
> And I get the following error:
> 
> Traceback (innermost last):
>   File /usr/LOCAL/Zope-2.5.0-linux2-x86/lib/python2.1/xml/sax/__init__.py, line
> 88, in make_parser
> SAXReaderNotAvailable: (see above)
> 
> PS: there is the same problem concerning Windows vs. Linux distribution of
> python 2.2: expat is included in the Windows version, not the Linux one. I
> managed to compile my own python2.2 under Linux including the Expat module, but

-- 
Holger Blasum <holger@blasum.net>   pls sign http://petition.eurolinux.org
GnuPG 1024D/995D35846FBC717E3562    against software patents in Europe!