Description
Describe the bug...
Steps to reproduce
- Install moin-1.5.3
- Create a new wiki instance from the templates
In WikiSandbox enter
This is a Link
or:
#format rst
- and save the page
- Get the following error message:
MoinWriter instance has no attribute 'head_prefix'
Example
Details
MoinMoin Version |
1.5.3 |
OS and Version |
Mac OS X 10.4.6 |
Python Version |
Python 2.4.2 |
Server Setup |
|
Server Details |
|
Workaround
This issue can be fixed by applying the below patch, or by downgrading to docutils 0.4.
1 --- rst.orig 2006-05-03 09:23:07.000000000 -0700
2 +++ rst.py 2006-05-03 09:25:06.000000000 -0700
3 @@ -165,6 +165,11 @@ class MoinWriter(html4css1.Writer):
4 self)
5 self.document.walkabout(visitor)
6 self.visitor = visitor
7 + # Docutils 0.5.0 and later require the writer to have the visitor
8 + # attributes.
9 + if (hasattr(html4css1.Writer, 'visitor_attributes')):
10 + for attr in html4css1.Writer.visitor_attributes:
11 + setattr(self, attr, getattr(visitor, attr))
12 self.output = html_escape_unicode(visitor.astext())
13
14 class Parser:
15 @@ -189,6 +194,7 @@ class Parser:
16 'file_insertion_enabled': 0,
17 'raw_enabled': 0,
18 'stylesheet_path': '',
19 + 'template': '',
20 }
21 )
22
It will be fixed in the next MoinMoin release.
Discussion
Which docutils version are you using?
docutils-snapshot from http://docutils.sourceforge.net/
Plan
- Priority:
Assigned to: Matthew Gilbert <gilbert AT voxmea DOT net>
- Status: Fixed