Description

Adding PyXML 0.8.4 to the user python path via the CGI script breaks the gui editor. I am unable to perform the save, previews, or cancel actions.

Steps to reproduce

  1. Install PyXml 0.8.4 with the following command

    python setup.py install --home=~mypylibs
  2. Add the following to moin.cgi
    sys.path.insert(0, '/home/ninecons/mypylibs/lib64/python')
  3. Open a browser to view the test to make sure pyxml is installed
    ${wiki-url to cgi}?action=test
  4. Open a page and edit with the gui, attempt to save.

Example

Details

traceback.htm

MoinMoin Version

1.5.4

OS and Version

Red Hat 3.4.5-2

Python Version

2.4.3

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Disable PyXML 0.8.4 or don't use the gui. (Neither is a very good choice)

Discussion

 1201 try:
 1202     return xml.dom.minidom.parseString(text)
 1203 except xml.parsers.expat.ExpatError, msg:

/!\ It is line 1203 failing because you don't have expat.py below parsers. I extracted PyXML-0.8.4 and I have a expat.py file in the parsers/ directory.

(!) Is your PyXML install maybe incomplete?

Unfortunately it appears to be complete. I have the file ~/mypylibs/lib64/python/_xmlplus/parsers/expat.py  and the corresponding compiled pyc. If I delete the pyc and then attempt to save with the gui, the expat.py class gets recompiled, and the save fails.

My expat.py reads:

"""Interface to the Expat non-validating XML parser."""
__version__ = '$Revision: 1.1 $'
from pyexpat import *

So do you also have a pyexpat.* there (in my case it is pyexpat.so)?

Yes, I also have the file  ~/mypylibs/lib64/python/_xmlplus/parsers/pyexpat.so  with 775 permissions. I also have the same revision as you in expat.py, could this issue be related to installing the library outside of the system libraries? Is there a dependency of PyXML 0.8.4 that I may be missing?

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/PyXML084BreaksGui (last edited 2007-10-29 19:11:00 by localhost)