[Moin-user] 'module' object has no attribute'expat' whensavingfrom gui editor

David Cramer dcramer at motive.com
Thu Jan 8 00:42:06 EST 2009


Btw., here's what I see in my apache error_log when I switch to python
2.5:

[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/share/moin/testwiki/cgi-bin/moin.cgi", line 29, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
MoinMoin.server.server_cgi import CgiConfig, run
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/site-packages/MoinMoin/server/server_cgi.py",
line 25, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
MoinMoin.request import request_cgi
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/site-packages/MoinMoin/request/__init__.py",
line 48, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
MoinMoin.Page import Page
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/site-packages/MoinMoin/Page.py", line 42, in
<module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
MoinMoin import config, caching, user, util, wikiutil
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/site-packages/MoinMoin/user.py", line 27, in
<module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
MoinMoin.support.python_compatibility import hash_new, hmac_new
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/site-packages/MoinMoin/support/python_compatib
ility.py", line 90, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     import
sha
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/sha.py", line 6, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     from
hashlib import sha1 as sha
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/hashlib.py", line 133, in <module>
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     md5 =
__get_builtin_constructor('md5')
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]   File
"/usr/local/lib/python2.5/hashlib.py", line 60, in
__get_builtin_constructor
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210]     import
_md5
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210] ImportError:
No module named _md5
[Wed Jan 07 23:38:14 2009] [error] [client 135.115.133.210] Premature
end of script headers: moin.cgi 

> -----Original Message-----
> From: David Cramer 
> Sent: Wednesday, January 07, 2009 11:32 PM
> To: Thomas Waldmann; moin-user at lists.sourceforge.net
> Subject: Re: [Moin-user] 'module' object has no 
> attribute'expat' whensavingfrom gui editor
> 
> Well, when I switch to python 2.5.1 using the method 
> described below, I get a 500 Internal Server Error once I 
> change /bin/python to point to python 2.5.1.
> 
> Is there something else to do when switching to a new python 
> version? Or is there some documentation on watch involved in 
> upgrading python from under an existing moinmoin install?
> 
> Thanks,
> David 
> 
> > -----Original Message-----
> > From: David Cramer
> > Sent: Wednesday, January 07, 2009 11:42 AM
> > To: 'Thomas Waldmann'; 'moin-user at lists.sourceforge.net'
> > Subject: RE: [Moin-user] 'module' object has no attribute 'expat' 
> > whensavingfrom gui editor
> > 
> > Ok, using a newer python is possible (unfortunately switching 
> > platforms would be harder...IT is making me move the wiki 
> into their 
> > datacenter because it's got so much valuable info in 
> it...I'm taking 
> > the machine they give me). Would the process be as follows, correct?
> > 
> > 1. Install python 2.5.x
> > 2. Copy /usr/local/lib/python2.4/site-packages/MoinMoin to the 
> > site-packages dir for python 2.5.
> > 3. Update moin.cgi to change sys.path.insert(0,
> > '/usr/local/lib/python2.4/site-packages') to the new 2.5 
> site-packages 
> > dir.
> > 4. Change /bin/python to point to python 2.5.
> > 5. Reinstall 4suite on python 2.5
> > 
> > Btw., I notice someone else had problems with PyXML and the GUI 
> > editor: http://moinmo.in/MoinMoinBugs/PyXML084BreaksGui
> > 
> > Thanks,
> > David
> > 
> > > -----Original Message-----
> > > From: Thomas Waldmann [mailto:tw-public at gmx.de]
> > > Sent: Wednesday, January 07, 2009 11:20 AM
> > > To: moin-user at lists.sourceforge.net
> > > Subject: Re: [Moin-user] 'module' object has no attribute 'expat' 
> > > whensavingfrom gui editor
> > > 
> > > > Any ideas as to why Render as DocBook would give that
> > > error? Does it
> > > > really require PyXML (I thought 4suite replaces PyXML)? Is
> > > there a way
> > > > to make the GUI editor work with PyXML?
> > > 
> > > You are having quite a lot of trouble with this stuff - I
> > guess this
> > > trouble is at least partly a platform problem, partly a
> > problem with
> > > the messy python 2.3/2.4 plus pyxml stuff.
> > > 
> > > 2 ideas:
> > >  * try a recent python 2.5.x (something equivalent to 
> python-xml is 
> > > built-in there, so you don't need to install pyxml)
> > >  * try other platform (e.g. debian or ubuntu linux), should
> > be easier
> > > 
> > > 
> > > 
> > > --------------------------------------------------------------
> > > ----------------
> > > Check out the new SourceForge.net Marketplace.
> > > It is the best place to buy or sell services for just about
> > anything
> > > Open Source.
> > > http://p.sf.net/sfu/Xq1LFB
> > > _______________________________________________
> > > Moin-user mailing list
> > > Moin-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/moin-user
> > > 
> 
> --------------------------------------------------------------
> ----------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for just about 
> anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
> 




More information about the Moin-user mailing list