I have a Windows 7 machine running Jython 2.5.2 and Sphinx 1.2.1 (with
Numpydoc 0.4). I have created a very simple module with a very simple class
documented within it. Everything works fine (the html documentation is
produced as expected), except for the following warning and error:
- WARNING: error while formatting [module name].Example: global name
'__builtins__' is not defined
- ERROR: Unknown directive type "autosummary"
My setup (all installed manually (extract then 'jython setup.py install')
because the Windows 7 machine is not connected to the internet):
- Jython 2.5.2
- Jinja2 2.6
- docutils 0.11
- Pygments 1.6
- Sphinx 1.2.1
- numpydoc 0.4
The sphinx-* scripts have been renamed with the '.py' extension so that
Windows recognises them as Python scripts (Windows does not look for
shebangs, even for files without a file extension).
The module:
class Example(object):
"""
An example class.
This class acts as a documentation example for testing auto-generation
of documentation.
Parameters
----------
a : string
A parameter called `a`
b : integer
A parameter called `b`
"""
def __init__(self, a, b):
pass
def example_method(self, a, b):
"""
An example method.
This method acts as a documentation example as well.
Parameters
----------
a : string
A parameter called `a`
b : integer
A parameter called `b`
"""
pass
The conf.py includes:
sys.path.insert(1, r"absolute\path\to\module")
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'numpydoc',
]
Why do I get this wanring and error, and/or how can I fix them?
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.