[mod_python] Expat-like parseString error

Joseph Bernhardt joe at incomps.com
Thu May 29 15:17:20 EDT 2008

I see that minidom actually uses the xml.parsers.expat module.  The version
information of this on my system is 1.95.8 and when imported in a mod_python
application will return a blank page:


from xml.parsers import expat


def index(req):

    return "blah"


Which is starting to make sense now, and that it is the conflict between
this version and the version that apache is trying to use.  My new question:
Is there any way to force minidom to use a different version of expat
(either 2.0.0 or 1.95.7, either of which I would assume would work)?  I
noticed there was an optional 'Parser' argument to the parseString function.
Is this something that would be helpful?  If not, I could probably update
apache.  At any rate, this is probably not a mod_python issue anymore, but I
still thank you in advance for any help you may provide.


Graham - thank you again for the documentation you provide in your websites.
They have been of great help so far.





I am experiencing an issue very similar to the one found here:




whereas as mod_python application will return a blank screen upon the
calling of parseString.  Example:


from xml.dom.minidom import parseString


def index(req):


    return "blah"


The funny thing is, I am using Python 2.5 with expat 2.0.0, and therefore
the expat bug should not apply, correct?  Apache is using expat 1.95.7.
Would that make a difference?   Perhaps it is something completely
different.  Also, importing expat works just fine:


import pyexpat


def index(req):

    return "blah"


and it returns what it should.  What else can I try to narrow down the
issue?  Or, is there some other documentation that someone can point me to?
I can't seem to find anything else.


Thanks in advance!


Joseph Bernhardt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080529/9211e47d/attachment.html

More information about the Mod_python mailing list