I am already in my virtualenv, and I am sure everything is on the python path.
(myenv)admin@ubuntu:/var/lib/mydirectory/doc$ sphinx-apidoc -o . ../testproject/
Creating file ./testproject.rst.
Creating file ./testproject.apps.rst.
# ... and many more .... #
Creating file ./modules.rst.
(myenv)admin@ubuntu:/var/lib/mydirectory/doc$ make html
sphinx-build -b html -d _build/doctrees . _build/html
Making output directory...
Running Sphinx v1.1.2
loading pickled environment... not yet created
building [html]: targets for 17 source files that are out of date
updating environment: 17 added, 0 changed, 0 removed
Traceback (most recent call last):t
File "/var/lib/server/myenv/lib/python2.6/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
ImportError: No module named webclient.__init__
# ... and many more .... #
/var/lib/mydirectory/doc/testproject.rst:7: WARNING: autodoc can't import/find module 'testproject.__init__', it reported error: "No module named testproject.__init__", please check your spelling and sys.path
# ... and many more .... #
When I open the html files, I only see headlines and section titles. No autodocs.
What is causing this problem? I am already on my virtual environment…
Any idea? I am using Sphinx 1.1.2.
Thanks.
I am not an expert in Sphinx. But the answer is pretty clear IMHO.
First, the error messages show you that the modules are not importable. This means import statements in some of the .py files are wrong.
Possible causes:
2.b is of particular interest. If you are in myapp/mysubapp/models.py, and you want to import myapp/views.py you need to provide the following statement:
Check each of the WARNING message, and look at each of the corresponding .py file. Find the corresponding import statement, and double check the availability.
Now back to the virtualenv problem. It seems to me your virtualenv might be a major cause as well. Just look at the first error:
This is a damn problem. Double check that your path variables have been setup correctly.