|
From: SourceForge.net <no...@so...> - 2010-07-12 18:32:05
|
Bugs item #1923166, was opened at 2008-03-22 19:34 Message generated for change (Comment added) made by grubert You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=422030&aid=1923166&group_id=38414 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: add-ons Group: sandbox >Status: Closed >Resolution: Fixed Priority: 2 Private: No Submitted By: David Taylor (knet) Assigned to: engelbert gruber (grubert) Summary: hthtml writer "has no attribute 'initial_header_level'" Initial Comment: When I try to use the hthtml writer I get the following traceback: Traceback (most recent call last): File "ht.py", line 4, in <module> publish_cmdline(writer_name='hthtml', description=description) File "/usr/lib/python2.5/site-packages/docutils/core.py", line 335, in publish_cmdline config_section=config_section, enable_exit_status=enable_exit_status) File "/usr/lib/python2.5/site-packages/docutils/core.py", line 206, in publish output = self.writer.write(self.document, self.destination) File "/usr/lib/python2.5/site-packages/docutils/writers/__init__.py", line 78, in write self.translate() File "/usr/lib/python2.5/site-packages/docutils/writers/hthtml.py", line 77, in translate visitor = self.translator_class(self.document) File "/usr/lib/python2.5/site-packages/docutils/writers/hthtml.py", line 96, in __init__ HTMLTranslator.__init__(self, document) File "/usr/lib/python2.5/site-packages/docutils/writers/html4css1/__init__.py", line 251, in __init__ self.initial_header_level = int(settings.initial_header_level) AttributeError: Values instance has no attribute 'initial_header_level' I have the following simple wrapper: #!/usr/bin/env python from docutils.core import publish_cmdline description = ('Generates .ht from .txt') publish_cmdline(writer_name='hthtml', description=description) I am using the following: $ python -V Python 2.5.1 $ python ht.py -V ht.py (Docutils 0.4.1 [repository]) I tried adding the initial_header_level to HTTranslator.__init__, but then I simply had a new traceback about the stylesheet. I then commented out the stylesheet code in HTTranslator.__init__ and received a new traceback about cloak_email_addresses (AttributeError: Values instance has no attribute 'cloak_email_addresses'). At that point, I figured if I did any more I might end up rewriting the thing. I don't want to do that as I realise there's a chance I might simply be using it incorrectly. ---------------------------------------------------------------------- >Comment By: engelbert gruber (grubert) Date: 2010-07-12 20:32 Message: no longer reproducableh ---------------------------------------------------------------------- Comment By: engelbert gruber (grubert) Date: 2008-03-22 21:12 Message: Logged In: YES user_id=147070 Originator: NO and why cant you use sandbox/oliverr/ht/rst2ht.py ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=422030&aid=1923166&group_id=38414 |