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
Install PyXml 0.8.4 with the following command
python setup.py install --home=~mypylibs
- Add the following to moin.cgi
sys.path.insert(0, '/home/ninecons/mypylibs/lib64/python')
- Open a browser to view the test to make sure pyxml is installed
${wiki-url to cgi}?action=test
- Open a page and edit with the gui, attempt to save.
Example
Details
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?
- No idea, sorry. But maybe try installing it to the default location (it works this way here).
- . Unfortunately, I have shared hosting so that's not an option. Are there any logs I can request from my hosting provider that may aide in debugging this issue? I'd like to track this down and fix this, since this will affect anyone that uses shared hosting such as college students, and small groups of people working on a project.
- I guess the best help could be from the PyXML developers, they know their code better than we do.
Plan
- Priority:
- Assigned to:
- Status: not a moin bug, probably installation or dependency problem