|
From: Richard J. <rj...@ek...> - 2002-10-11 06:07:16
|
On Fri, 11 Oct 2002 3:57 pm, Aahz wrote:
> I tried this recipe David gave to Michael Hudson::
>
> pub = core.Publisher()
> options = pub.set_options()
> pub.source = io.FileInput(options, source_path=sys.argv[1])
> pub.destination = io.StringOutput(options)
> pub.set_reader('standalone', None, 'restructuredtext')
> pub.writer = OOwriter.Writer
> content = pub.publish()
>
> and got this traceback::
>
> Traceback (most recent call last):
> File "open_office.py", line 17, in ?
> content = pub.publish()
> File "/home/aahz/src/Lib-Python/docutils/core.py", line 135, in
> publish document = self.reader.read(self.source, self.parser, self.options)
> File "/home/aahz/src/Lib-Python/docutils/readers/__init__.py", line 69, in
> read self.parse()
> File "/home/aahz/src/Lib-Python/docutils/readers/__init__.py", line
> 77, in parse self.parser.parse(self.input, document)
> File "/home/aahz/src/Lib-Python/docutils/parsers/rst/__init__.py",
> line 89, in parse self.statemachine.run(inputlines, document,
> inliner=self.inliner) File
> "/home/aahz/src/Lib-Python/docutils/parsers/rst/states.py", line 152, in
> run inliner.init_customizations(document.options)
> File "/home/aahz/src/Lib-Python/docutils/parsers/rst/states.py", line
> 435, in init_customizations if options.pep_references:
> AttributeError: Values instance has no attribute 'pep_references'
> make: *** [test] Error 1
Ah, the options structure. Yeah, that bit me a few times :)
See if the code in the ZReST product helps... sandbox/richard/ZReST/ZReST.py
in the render method.
Richard
|