Hello!
I use web2py 1.94 on Ubuntu with Python 2.7 and Sphinx 1.0.7. For the
documentation purposes, i have created a 'doc'-directory inside my
web2py-application. My web2py project has the following structure:
web2py
|_ server
| |_ applications
| |_ init
| | |_ controllers
| | |_ myapp.py
... ...
| |_ modules
| |_ xml2obj.py
...
|_ doc
When i try to generate documentation for the myapp.py-file with
sphinx, i get the following warning:
Traceback (most recent call
last):
File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.0.7-py2.7.egg/
sphinx/ext/autodoc.py", line 329, in import_object
__import__(self.modname)
File "/home/vpetkov/Documents/web2py/server/applications/init/
controllers/myapp.py", line 16, in <module>
xml2obj = local_import('xml2obj', reload=False)
NameError: name 'local_import' is not defined
/home/vpetkov/Documents/web2py/server/doc/myapp.rst:7: (WARNING/2)
autodoc can't import/find module 'myapp', it reported error: "name
'local_import' is not defined", please check your spelling and
sys.path
Additionally. in conf.py Sphinx file, i added
sys.path.append(os.path.abspath('../applications/init/modules/'))