Issues

Issue #1164 resolved

user error (:member: instead of :members: in .. autoclass::) gives unhelpful error

Anonymous created an issue

I have something like this:

.. autoclass:: my.cool.class :member:

and I get the error below. As requested, I'm reporting this so that a more helpful error message can be issued:

Exception occurred:
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 321, in nested_list_parse
    node=node, match_titles=match_titles)
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/python2.7/dist-packages/docutils/statemachine.py", line 237, in run
    context, state, transitions)
  File "/usr/lib/python2.7/dist-packages/docutils/statemachine.py", line 458, in check_line
    return method(match, context, next_state)
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 2589, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 2295, in explicit_construct
    return method(self, expmatch)
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 2036, in directive
    directive_class, match, type_name, option_presets)
  File "/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py", line 2087, in run_directive
    result = directive_instance.run()
  File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 1300, in run
    self.options.items(), doc_class.option_spec))
  File "/usr/lib/python2.7/dist-packages/docutils/utils.py", line 318, in assemble_option_dict
    convertor = options_spec[name]  # raises KeyError if unknown
KeyError: 'member'
The full traceback has been saved in /tmp/sphinx-err-1Icas2.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!

Comments (4)

  1. Log in to comment