Hi,

I used v1.0.7 and got this error when using autodoc because of
incorrect settings,
so I post the solution here to save people's time in case that you
make the same mistake as me.

In conf.py, I set:

    sys.path.append('/usr/lib/python2.5/site-packages/Sphinx-1.0.7-
py2.5.egg/sphinx/ext')
    extensions = ['graphviz', 'autodoc']

which would fail and the correct setting should be:

    extensions = ['sphinx.ext.graphviz', 'sphinx.ext.autodoc']

I originally think they are equal, but after tracing codes, I found
the first setting will have problem
due to the circular import between ext/autodoc.py and application.py.
The first configuration will
cause Python imports "autodoc" and "sphinx.ext.autodoc" which are two
different modules.
Then, "issubclass(cls, Documenter)" in autodoc.py will be false
because cls and Documenter
are in two different "autodoc" modules, the "Documenter" is really not
the superclass of cls
which is in another "autodoc" module.

Btw, I wonder the necessity of the circular import. Without using
application.add_autodocumenter,
it can avoid such problem.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to