Issues

Issue #507 resolved

Sphinx (0.6.5, 1.0.2) problem with string ']# '

Anonymous created an issue

Hi,

I encounter a problem if a string variable in the source code contains following {{{ value = ']# ' }}}

sphinx-build reports {{{ Exception occurred: File "/usr/lib/python2.4/site-packages/sphinx/domains/python.py", line 162, in handle_signature stack[-1] += addnodes.desc_parameter(token, token) IndexError: list index out of range The full traceback has been saved in /tmp/sphinx-err-QcFi29.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. Either send bugs to the mailing list at http://groups.google.com/group/sphinx-dev/, or report them in the tracker at http://bitbucket.org/birkenfeld/sphinx/issues/. Thanks! make: *** [html] Error 1 }}}

if i just remove the string value everything works as expected. the trace from the tempfile is attached below.

regards

Michael Lang


{{{

Sphinx version: 1.0.2

Docutils version: 0.6 release

Jinja2 version: 2.3.1

Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/sphinx/cmdline.py", line 173, in main app.build(force_all, filenames) File "/usr/lib/python2.4/site-packages/sphinx/application.py", line 207, in build self.builder.build_update() File "/usr/lib/python2.4/site-packages/sphinx/builders/init.py", line 197, in build_update summary='targets for %d source files that are ' File "/usr/lib/python2.4/site-packages/sphinx/builders/init.py", line 218, in build purple, length): File "/usr/lib/python2.4/site-packages/sphinx/builders/init.py", line 120, in status_iterator for item in iterable: File "/usr/lib/python2.4/site-packages/sphinx/environment.py", line 515, in update_generator self.read_doc(docname, app=app) File "/usr/lib/python2.4/site-packages/sphinx/environment.py", line 655, in read_doc pub.publish() File "/usr/lib/python2.4/site-packages/docutils/core.py", line 203, in publish self.settings) File "/usr/lib/python2.4/site-packages/docutils/readers/init.py", line 69, in read self.parse() File "/usr/lib/python2.4/site-packages/docutils/readers/init.py", line 75, in parse self.parser.parse(self.input, document) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/init.py", line 157, in parse self.statemachine.run(inputlines, document, inliner=self.inliner) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 170, in run input_source=document['source']) File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 232, in run context, next_state, result = self.check_line( File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2678, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 323, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection node=section_node, match_titles=1) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 278, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 232, in run context, next_state, result = self.check_line( File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2258, in explicit_markup nodelist, blank_finish = self.explicit_construct(match) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2270, in explicit_construct return method(self, expmatch) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2012, in directive return self.run_directive( File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2062, in run_directive result = directive_instance.run() result = directive_instance.run() File "/usr/lib/python2.4/site-packages/sphinx/ext/autodoc.py", line 1171, in run nested_parse_with_titles(self.state, self.result, node) File "/usr/lib/python2.4/site-packages/sphinx/util/nodes.py", line 32, in nested_parse_with_titles return state.nested_parse(content, 0, node, match_titles=1) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 278, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 232, in run context, next_state, result = self.check_line( File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2678, in underline self.section(title, source, style, lineno - 1, messages) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 323, in section self.new_subsection(title, lineno, messages) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection node=section_node, match_titles=1) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 278, in nested_parse node=node, match_titles=match_titles) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 232, in run context, next_state, result = self.check_line( File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2260, in explicit_markup self.explicit_list(blank_finish) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2289, in explicit_list match_titles=self.state_machine.match_titles) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 315, in nested_list_parse node=node, match_titles=match_titles) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 195, in run results = StateMachineWS.run(self, input_lines, input_offset) File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 232, in run context, next_state, result = self.check_line( File "/usr/lib/python2.4/site-packages/docutils/statemachine.py", line 421, in check_line return method(match, context, next_state) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2562, in explicit_markup nodelist, blank_finish = self.explicit_construct(match) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2270, in explicit_construct return method(self, expmatch) File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2012, in directive return self.run_directive( File "/usr/lib/python2.4/site-packages/docutils/parsers/rst/states.py", line 2062, in run_directive result = directive_instance.run() File "/usr/lib/python2.4/site-packages/sphinx/domains/init.py", line 191, in run return BaseDirective.run(self) File "/usr/lib/python2.4/site-packages/sphinx/directives/init.py", line 146, in run name = self.handle_signature(sig, signode) File "/usr/lib/python2.4/site-packages/sphinx/domains/python.py", line 162, in handle_signature stack[-1] += addnodes.desc_parameter(token, token) IndexError: list index out of range }}}

Comments (3)

  1. Log in to comment