Suppose that the file index.rst contains the text below. This results (for me) in the error message above. In addition the local table off contents has variable_name for the link to the heading variable_name_. Is this expected and if so, how should one document a case like this ?
Test Headings
#############
.. contents::
:local:
Arguments to Constructor
************************
variable_name
=============
Discussion of this argument
Memember Variables
******************
variable_name_
==============
Discussion of this member variable