Discussion:
[Docutils-users] Bug report
Ayan Shafqat
2014-08-07 14:53:01 UTC
Permalink
I am trying to convert a RST file into TWIKI, using Cygwin:

CYGWIN_NT-6.1-WOW64 <HOSTNAME> 1.7.17(0.262/5/3) 2012-10-19 14:39 i686
Cygwin
*​**$ rst2twiki.py --traceback FILE.rst*
File "/usr/bin/rst2twiki.py", line 5, in <module>
pkg_resources.run_script('rst2twiki==0.1', 'rst2twiki.py')
File "build/bdist.linux-i686/egg/pkg_resources.py", line 489, in
run_script
yield ep
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1214, in
run_script
File
"/usr/lib/python2.7/site-packages/rst2twiki-0.1-py2.7.egg/EGG-INFO/scripts/rst2twiki.py",
line 258, in <module>
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 352, in
publish_cmdline
config_section=config_section, enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 219, in
publish
output = self.writer.write(self.document, self.destination)
File "/usr/lib/python2.7/site-packages/docutils/writers/__init__.py",
line 80, in write
self.translate()
File
"/usr/lib/python2.7/site-packages/rst2twiki-0.1-py2.7.egg/EGG-INFO/scripts/rst2twiki.py",
line 19, in translate
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in
walkabout
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 166, in
walkabout
visitor.dispatch_visit(self)
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1882, in
dispatch_visit
return method(node)
File
"/usr/lib/python2.7/site-packages/rst2twiki-0.1-py2.7.egg/EGG-INFO/scripts/rst2twiki.py",
line 239, in visit_entry
AttributeError: WikiVisitor instance has no attribute 'thead'​
*$ rst2twiki.py --version*
rst2twiki.py (Docutils 0.12 [repository], Python 2.7.3, on cygwin)
​​
Guenter Milde
2014-08-07 18:14:00 UTC
Permalink
[-- Type: text/plain, Encoding: quoted-printable --]
CYGWIN_NT-6.1-WOW64 <HOSTNAME> 1.7.17(0.262/5/3) 2012-10-19 14:39 i686
Post by Ayan Shafqat
Cygwin
*​**$ rst2twiki.py --traceback FILE.rst*
File "/usr/bin/rst2twiki.py", line 5, in <module>
pkg_resources.run_script('rst2twiki==0.1', 'rst2twiki.py')
File "build/bdist.linux-i686/egg/pkg_resources.py", line 489, in
run_script
yield ep
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1214, in
run_script
File
"/usr/lib/python2.7/site-packages/rst2twiki-0.1-py2.7.egg/EGG-INFO/scripts/rst2twiki.py",
line 258, in <module>
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 352, in
publish_cmdline
config_section=config_section, enable_exit_status=enable_exit_status)
File "/usr/lib/python2.7/site-packages/docutils/core.py", line 219, in
publish
...
Post by Ayan Shafqat
File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1882, in
dispatch_visit
return method(node)
File
"/usr/lib/python2.7/site-packages/rst2twiki-0.1-py2.7.egg/EGG-INFO/scripts/rst2twiki.py",
line 239, in visit_entry
AttributeError: WikiVisitor instance has no attribute 'thead'​
This seems to be a missing feature in the "twiki" writer:

Please note that TWiki only implements a very small subset of
DocUtils's markup features. Thus, the script is by necessity a bit of a
hack. It is of course possible to simply use HTML to "fill in the
gaps", but this would altogether defeat the purpose of TWiki markup.
Instead, errors are given whenever an unimplemented feature of
ReStructured Text is used in the document.

-- https://github.com/djspiewak/rst2twiki

Are tables supported in TWiki?

Mind, that rst2twiki is not part of Docutils but an external add-on.
Post by Ayan Shafqat
*$ rst2twiki.py --version*
rst2twiki.py (Docutils 0.12 [repository], Python 2.7.3, on cygwin)
This output is somewhat misleading: rst2twiki builds on Docutils and it
seems that the wrapper script rst2twiki.py is modelled after the wrapper
scripts provided with Docutils.


Günter

Loading...