Felix Wiemann | 4 Sep 2005 00:33
Picon

Re: error running rst2html.py on FAQ.txt

Kwok Fung wrote:

> Docutils version (0.3.10 [snapshot 2005-09-03, r3846]),
> Python version (2.4.1),
>
> OS type & version: Windows XP SP 2
>
> command line used.:
>
> C:\Program Files\Python24\Lib\site-packages\docutils\tools>python rst2html.py --traceback
..\FAQ.txt ..\FAQ.html
>
> Trace back listing:
>
> Traceback (most recent call last):
>   File "rst2html.py", line 26, in ?
>     settings_overrides={'_stylesheet_required': 1})
>   File "C:\Program files\Python24\Lib\site-packages\docutils\core.py", 
> line 341, in publish_cmdline
>     config_section=config_section, enable_exit_status=enable_exit_status)
>   File "C:\Program files\Python24\Lib\site-packages\docutils\core.py", 
> line 217, in publish
>     self.apply_transforms()
>   File "C:\Program files\Python24\Lib\site-packages\docutils\core.py", 
> line 186, in apply_transforms
>     self.document.transformer.apply_transforms()
>   File "C:\Program 
> files\Python24\Lib\site-packages\docutils\transforms\__init__.py", line 
> 192, in apply_transforms
>     transform.apply(**kwargs)
(Continue reading)

Felix Wiemann | 4 Sep 2005 01:09
Picon

Re: error running rst2html.py on FAQ.txt

[Resent to Docutils-users.  Removed ZIP file because SF.net is blocking
mail with ZIP files attached.  The ZIP file has been sent to Kwok Fung,
though.]

Felix Wiemann wrote:

> This is probably because nodes.target is not of type ClassType.  Kwok,
> do you have added a "__metaclass__ = type" in your
> /usr/lib/python2.4/site-packages/sitecustomize.py, maybe?

I.e., if you *are* setting the __metaclass__ somewhere, that's probably
the reason, so you should remove that command.

Otherwise, I'm sorry I have no clue what the error is because of -- I
can't reproduce it.  Any hints appreciated.

For the meantime, if you replace the "nodes.py" file of your Docutils
installation with the nodes.py in the attached ZIP file, does it work
then?

For developers, this is the diff:

Index: docutils/nodes.py
===================================================================
--- docutils/nodes.py   (revision 3846)
+++ docutils/nodes.py   (working copy)
 <at>  <at>  -28,7 +28,7  <at>  <at> 
 import re
 import warnings
 from types import IntType, SliceType, StringType, UnicodeType, \
(Continue reading)


Gmane