[Zope] Zope 2.6.1 and xml.sax.expatparser problems

Tom Emerson tree@basistech.com
Mon, 10 Feb 2003 00:10:19 -0500


Greetings,

I have a (Python) external method that imports a module Foo which in turn
imports a module containing

from xml.dom.minidom import parseString

This results in the following traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 98, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 252, in __call__
  Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 315, in _exec
  Module Script (Python), line 6, in query.py
   - <PythonScript at /nonce/search/query.py>
   - Line 6
  Module Products.ExternalMethod.ExternalMethod, line 224, in __call__
   - __traceback_info__: (('\xd8\xa8\xd9\x88\xd8\xb4', 'off', 'on', ''), {}, None)
  Module /usr/opt/nonce/Zope-2.6.1-src/Extensions/ArZope.py, line 100, in ProcessQuery
  Module /usr/opt/nonce/Zope-2.6.1-src/Extensions/ArZope.py, line 61, in IssueQuery
  Module FastSDK, line 58, in __init__
  Module xml.dom.minidom, line 915, in parseString
  Module xml.dom.minidom, line 901, in _doparse
  Module xml.dom.pulldom, line 301, in parseString
  Module xml.sax, line 76, in make_parser
  Module xml.sax, line 101, in _create_parser
AttributeError: 'xml.sax.expatreader' module has no attribute 'create_parser'

I can load Foo directly in Python without issue, so this appears to be
somehow related to Zope. It was my understanding that external methods
ran without "interference" from Zope's security mechanism.

This is running on FreeBSD 4.6.2-RELEASE-p2, Python 2.1.3 (with
FreeBSD thread stack patch), and Zope 2.6.1. Both Python and Zope were
built from source.

I'm at a loss to explain this lossage. Anyone have any ideas of what I could try?

TIA,

    -tree

-- 
Tom Emerson                                          Basis Technology Corp.
Software Architect                                 http://www.basistech.com
  "Beware the lollipop of mediocrity: lick it once and you suck forever"