[Moin-user] 'module' object has no attribute 'expat' when saving from gui editor

David Cramer dcramer at motive.com
Tue Jan 6 11:37:42 EST 2009


Ok, thanks. Good to know about the regexp problem. At this point, I'll
be happy if it just worked with static includes. I did a test on the
moinmoin wiki and see that it works there with includes
<http://moinmo.in/DavidCramer>, so it's something with my
environment/installation.

I think the "Render as DocBook" is a nice feature to have. It gives our
developers a way to write up a first draft of content in a format that
we in tech pubs can consume directly without a lot of tedious markup. 

Another direction I would like to see this taken is to add
actions/formatters to generate the DocBook and further process it into
other outputs. Currently I do this by having my doc build script grab
the docbook verison of the page and xslt it to my liking, but having it
integrated into the wiki as an action would improve the usabiity. Here
are the things I would be interested in seeing: 

 * Make pdfs of higher quality than is currently possible with the
actions/macros based on htmldoc. The DocBook Open Repository XSLs are
highly configurable stylesheets for turning DocBook into a variety of
formats <http://docbook.sourceforge.net/>. For example, a feature the
DocBook xsls have is to automatically break lines in code listings at a
configurable list of characters and add a arrow to indicate that the
line has been broken for typographical reasons. This would avoid the
situation where a code listing that looks fine in html, but runs off the
side of the page in the pdf. There is an open source fo renderer,
Apache's fop  <http://xmlgraphics.apache.org/fop/>, that can take the
XML and turn it into a pdf.  

 * Generate help sets from a wiki page (or set of pages Included into
one page). The xsls can turn it into something like this:
http://www.thingbag.net/docbook/docbook-webhelp/index.html So then your
wiki is a help authoring tool too :-)

 * In addition to being able to use the Include macro to make a big page
out of smaller pages, and then generate a book from that, you could
create a "map" page that defines a table of contents of other pages.
These other pages could be collected in a book. One advanage over the
Include() method is that headings would automatically be adjusted to the
appropriate level for their place in the tree. If you had created
something as an h2 in moinmoin, and then wanted to use it as an h4, the
xsls would do the work.

David 

> -----Original Message-----
> From: Mail at Heavy.ch [mailto:mail at heavy.ch] 
> Sent: Tuesday, January 06, 2009 10:21 AM
> To: moin-user List
> Subject: Re: [Moin-user] 'module' object has no attribute 
> 'expat' when saving from gui editor
> 
> Hi
> 
> I added a bug report
> http://moinmo.in/MoinMoinBugs/1.8%20DocbookErrorWithMacroInclu
de because  I also have some problems using docbook rendering on > pages
with include macros.
> 
> But your problems "ImportError: ld.so.1: python: fatal: libgcc_s.so.1:
> open failed: No > such file or directory"... looks for me 
> more something deeper and not moinmoin relevant.
> 
> bye
> Marcel
> 
> 
> 
> 
> 
> 
> David Cramer schrieb:
> > Ok, thanks for the tip. I didn't know that mattered for the 
> GUI editor.
> > Here's some more information about what I've done and what the 
> > symptoms
> > are:
> > 
> > Immediately after upgrading to 1.8.1, the GUI editor was 
> working for 
> > at least one of the four wikis I have running off this box, 
> but giving 
> > that same "expat" error for another one. I decided to save 
> working on 
> > that for later, assuming it was some misconfiguration in 
> the one wiki.
> > 
> > In the mean time, I wanted to get the "Render as DocBook" 
> thing working.
> > This is a feature I need and was a big reason for upgrading (it 
> > produced bad DocBook in 1.5.x). "Render as DocBook" 
> complained that it 
> > needed 4suite, so I installed 4Suite-1.0b1 and 4Suite-XML-1.0.2, 
> > however "Render as DocBook" still didn't work but it no longer 
> > complained about 4suite not being installed. Further investigation 
> > revealed that 4Suite is having problems finding libraries. For 
> > example, when I run "4xml -help", I get "ImportError: 
> ld.so.1: python: 
> > fatal: libgcc_s.so.1: open
> > failed: No such file or directory", but if I first do "export 
> > LD_LIBRARY_PATH=/usr/local/lib", 4xml works. Something I 
> read made me 
> > think that installing pyxml would help, so I installed the latest 
> > version (0.8.4). After that "Render as DocBook" works for all pages 
> > that do not use the <<Include()>> macro. However, it 
> appears that this 
> > may have broken the GUI editor.
> > 
> > So my current situation is:
> > 
> >  * 4Suite-1.0b1 and 4Suite-XML-1.0.2 installed, but the 4Suite 
> > commands fail unless the environment variable 
> LD_LIBRARY_PATH=/usr/local/lib.
> >  * PyXML 0.8.4 is installed (I did it --without-xpath 
> --without-xslt 
> > because the 4suite instructions say that works better:
> > http://4suite.org/docs/howto/UNIX.xml)
> >  * GUI editor does not work with the expat error I mentioned below. 
> >  * "Render as DocBook" works for pages that do not have the 
> > <<Include()>> macro. If the page uses Include, moinmoin 
> gives an error
> > "ImportError: ld.so.1: python: fatal: libgcc_s.so.1: open 
> failed: No 
> > such file or directory", which I assume is my 4suite 
> library problem.
> >  * Other info:
> >   * Platform: SunOS newthing 5.10 Generic_137138-09 i86pc
> >   * Python: Python 2.4.4 (/usr/bin/python)
> >   * MoinMoin: Release 1.8.1 (release)
> >   * gcc (GCC) 3.4.6
> > 
> > My guess is that if 4suite were working I might not even 
> need PyXML. 
> > Any ideas on how to proceed?
> > 
> > Thanks,
> > David
> > 
> >> -----Original Message-----
> >> From: R.Bauer [mailto:rb.proj at gmail.com]
> >> Sent: Tuesday, January 06, 2009 8:16 AM
> >> To: moin-user at lists.sourceforge.net
> >> Subject: Re: [Moin-user] 'module' object has no attribute 'expat' 
> >> when saving from gui editor
> >>
> >> David Cramer schrieb:
> >>> Hi there,
> >>> I recently upgraded from 1.5.7 to 1.8.1. Somewhere along
> >> the way, the
> >>> GUI editor stopped being able to save pages. You can edit 
> the page 
> >>> fine, but if you click "Save Changes", "Preview", "Text
> >> Mode", "Check
> >>> Spelling", or "Cancel" you get  the following error (full error is
> >>> attached): 'module' object has no attribute 'expat'
> >>>  
> >>> Is there some config change I missed or some package I forgot to 
> >>> install on the new machine?
> >>>  
> >>> Thanks,
> >>> David
> >>>
> >> Normally xml is builtin into the python standard library.
> >>
> >> But I know also that for SuSE we often have had to install an 
> >> additional pyxml package. May be that is similiar to SunOS.
> >>
> >>
> >> cheers
> >> Reimar
> >>
> >>
> >> --------------------------------------------------------------
> >> ----------------
> >> _______________________________________________
> >> Moin-user mailing list
> >> Moin-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/moin-user
> >>
> > 
> > 
> ----------------------------------------------------------------------
> > -------- _______________________________________________
> > 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