← Back to team overview

openerp-doc team mailing list archive

Re: Autodoc of ORM classes

 

Le 29/12/10 22:10, Don Kirkby a écrit :
Thanks for the hints, I'm making progress, but I've still got some
problems. I'm using the server trunk branch revision 3190 from earlier
today.
My first problem is that sphinx seems to be ignoring my PYTHONPATH
environment variable. I've worked around it by adding the path to my
conf.py file like this:
sys.path.append('/path/to/server/trunk/bin/')

That works too, though I wonder if it could be due to a different version of Sphinx? I'm using 1.0.1 currently, and don't remember doing anything for the PYTHONPATH to work.


Even with that workaround, though, I still get errors:
openerp-bzr/server/trunk/bin/osv/osv.py:docstring of
osv.osv.osv.create:16: (ERROR/3) Unknown interpreted text role
"py:meth".
openerp-bzr/server/trunk/bin/osv/osv.py:docstring of
osv.osv.osv.name_search:13: (ERROR/3) Unknown interpreted text role
"py:meth".
openerp-bzr/server/trunk/bin/osv/osv.py:docstring of
osv.osv.osv.name_search:13: (ERROR/3) Unknown interpreted text role
"py:meth".
openerp-bzr/server/trunk/bin/osv/osv.py:docstring of
osv.osv.osv.name_search:13: (ERROR/3) Unknown interpreted text role
"py:meth".
openerp-bzr/server/trunk/bin/osv/osv.py:docstring of
osv.osv.osv.read_group:12: (ERROR/3) Unknown interpreted text role
"py:meth".

This seems to be referring to the docstring for orm.create() in
bin/osv/orm.py line 3500 where it uses the :py:meth: directive. Do I
need to do something to enable the Python domain in Sphinx?

As far as I know the Python domain is builtin and enabled by default. The error seems to come from docutils though, and I remember having some trouble with it before I upgraded.
I'm now using docutils 0.6 and it seems to behave more reliably.

Could you try updating your sphinx and docutils packages, if you are using older versions than sphinx 1.0.1 and docutils 0.6?

Not sure it will fix it, but might be worth a shot...



References