[Zope] Zope-2.5.0 and expatreader

Juan Carlos Coruña jcoruna@ibdosnorte.com
Tue, 29 Jan 2002 17:01:21 +0100


Hello all,

I am having problems related to xml. I have reproduced the error with the
following external method:

->
from xml.sax import ContentHandler, ErrorHandler, parseString, make_parser
from xml.sax.handler import feature_namespaces

class Handler(ContentHandler,ErrorHandler):
    pass

def extractXML():
    dh = Handler()
    parser = make_parser()
<-

If you execute this method you obtain an AttributeError:

'xml.sax.expatreader' module has no attribute 'create_parser'

 Traceback:
   Traceback (innermost last):
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
98, in publish
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python/ZPublisher/mapply.py, line
88, in mapply
    (Object: test)
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python/ZPublisher/Publish.py, line
39, in call_object
    (Object: test)
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python/Products/ExternalMethod/Ext
ernalMethod.py, line 202, in __call__
    (Object: test)
    (Info: ((), {}, None))
  File /var/local/zope/www-2.5.0/Extensions/test.py, line 9, in extractXML
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python2.1/xml/sax/__init__.py,
line 76, in make_parser
  File
/usr/local/zope/Zope-2.5.0-linux2-x86/lib/python2.1/xml/sax/__init__.py,
line 101, in _create_parser
AttributeError: 'xml.sax.expatreader' module has no attribute
'create_parser'

Therefore with Zope-2.5.0b4 there was no problem.

Any ideas?

Juan Carlos Coruña
jcoruna@ibdosnorte.com

Corporación Tecnológica IBdos Norte, S.A.
C/ Ibañez de Bilbao, 28-4º B (Edificio MAPFRE)
48009 - Bilbao (SPAIN)
Tlf: +34 94 661 30 30
Fax: +34 94 423 87 52