From: McHugh, M. <Mic...@bo...> - 2014-06-10 16:42:57
|
Hi Joshua, I am having some trouble converting some documents from RST to twiki format. I wonder if there's something obvious that I'm doing wrong... I am using Windows Python 2.7 within a Cygwin shell (although I get similar output from a "cmd" shell window). I have copied the following files as indicated rst2wiki.py ==> C:\Python27\Scripts\ wiki.py ==> C:\Python27\Lib\site-packages\docutils\writers\ I get the following output: mm@laptop ~ $ /cygdrive/c/Python27/python.exe C:/Python27/Scripts/rst2wiki.py --wiki twiki test.rst test.twiki NotImplementedError: docutils.writers.wiki.TWikiTranslator visiting unknown node type: transition Exiting due to error. Use "--traceback" to diagnose. Please report errors to <doc...@li...>. Include "--traceback" output, Docutils version (0.11 [repository]), Python version (2.7.2), your OS type & version, and the command line used. mm@laptop ~ $ /cygdrive/c/Python27/python.exe C:/Python27/Scripts/rst2wiki.py --traceback --wiki twiki test.rst test.twiki Traceback (most recent call last): File "C:/Python27/Scripts/rst2wiki.py", line 37, in <module> publish_cmdline(writer=wiki.Writer(), description=description) File "C:\Python27\lib\site-packages\docutils\core.py", line 352, in publish_cmdline config_section=config_section, enable_exit_status=enable_exit_status) File "C:\Python27\lib\site-packages\docutils\core.py", line 219, in publish output = self.writer.write(self.document, self.destination) File "C:\Python27\lib\site-packages\docutils\writers\__init__.py", line 80, in write self.translate() File "C:\Python27\lib\site-packages\docutils\writers\wiki.py", line 55, in translate self.document.walkabout(visitor) File "C:\Python27\lib\site-packages\docutils\nodes.py", line 174, in walkabout if child.walkabout(visitor): File "C:\Python27\lib\site-packages\docutils\nodes.py", line 166, in walkabout visitor.dispatch_visit(self) File "C:\Python27\lib\site-packages\docutils\nodes.py", line 1882, in dispatch_visit return method(node) File "C:\Python27\lib\site-packages\docutils\nodes.py", line 1907, in unknown_visit % (self.__class__, node.__class__.__name__)) NotImplementedError: docutils.writers.wiki.TWikiTranslator visiting unknown node type: transition If I can't use this tool, my team and I might have to convert the RST to wiki by hand (ugh...) or we might roll-our-own script to do most of the heavy lifting. We would love to use the tool you've created though! Many thanks for your help! Mike McHugh DSP Engineer Automotive Systems Division Bose Corporation Mic...@bo...<mailto:Mic...@bo...> office: (508)-305-4531 cell: (970)-367-6443 |
From: David G. <go...@py...> - 2014-06-10 19:41:53
|
> NotImplementedError: docutils.writers.wiki.TWikiTranslator visiting unknown > node type: transition I'm not Joshua, and I don't know the code in question, but the message above tells me that the wiki.py module simply doesn't handle "transition" nodes. You could either remove the transitions from your source, or add code to the wiki.py module to handle them. After you do that, if you get other similar "NotImplementedError" messages, you'll have to repeat the process. -- David Goodger On Tue, Jun 10, 2014 at 11:28 AM, McHugh, Michael <Mic...@bo...> wrote: > Hi Joshua, > > > > I am having some trouble converting some documents from RST to twiki format. > I wonder if there’s something obvious that I’m doing wrong... > > > > I am using Windows Python 2.7 within a Cygwin shell (although I get similar > output from a “cmd” shell window). > > > > I have copied the following files as indicated > > rst2wiki.py è C:\Python27\Scripts\ > > wiki.py è C:\Python27\Lib\site-packages\docutils\writers\ > > > > I get the following output: > > > > mm@laptop ~ > > $ /cygdrive/c/Python27/python.exe C:/Python27/Scripts/rst2wiki.py --wiki > twiki test.rst test.twiki > > Exiting due to error. Use "--traceback" to diagnose. > > Please report errors to <doc...@li...>. > > Include "--traceback" output, Docutils version (0.11 [repository]), > > Python version (2.7.2), your OS type & version, and the > > command line used. > > > > mm@laptop ~ > > $ /cygdrive/c/Python27/python.exe C:/Python27/Scripts/rst2wiki.py > --traceback --wiki twiki test.rst test.twiki > > Traceback (most recent call last): > > File "C:/Python27/Scripts/rst2wiki.py", line 37, in <module> > > publish_cmdline(writer=wiki.Writer(), description=description) > > File "C:\Python27\lib\site-packages\docutils\core.py", line 352, in > publish_cmdline > > config_section=config_section, enable_exit_status=enable_exit_status) > > File "C:\Python27\lib\site-packages\docutils\core.py", line 219, in > publish > > output = self.writer.write(self.document, self.destination) > > File "C:\Python27\lib\site-packages\docutils\writers\__init__.py", line > 80, in write > > self.translate() > > File "C:\Python27\lib\site-packages\docutils\writers\wiki.py", line 55, in > translate > > self.document.walkabout(visitor) > > File "C:\Python27\lib\site-packages\docutils\nodes.py", line 174, in > walkabout > > if child.walkabout(visitor): > > File "C:\Python27\lib\site-packages\docutils\nodes.py", line 166, in > walkabout > > visitor.dispatch_visit(self) > > File "C:\Python27\lib\site-packages\docutils\nodes.py", line 1882, in > dispatch_visit > > return method(node) > > File "C:\Python27\lib\site-packages\docutils\nodes.py", line 1907, in > unknown_visit > > % (self.__class__, node.__class__.__name__)) > > NotImplementedError: docutils.writers.wiki.TWikiTranslator visiting unknown > node type: transition > > > > > > If I can’t use this tool, my team and I might have to convert the RST to > wiki by hand (ugh...) or we might roll-our-own script to do most of the > heavy lifting. We would love to use the tool you’ve created though! > > > > Many thanks for your help! > > > > Mike McHugh > > DSP Engineer > > Automotive Systems Division > > Bose Corporation > > Mic...@bo... > > office: (508)-305-4531 > > cell: (970)-367-6443 > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Docutils-users mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-users > > Please use "Reply All" to reply to the list. > |