Repository navigation
Open
Description
My builds have started to fail:
Running Sphinx v2.4.4
Exception occurred:
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/deprecation.py", line 49, in __getattr__
return getattr(self._module, name)
AttributeError: module 'sphinx.ext.autodoc' has no attribute 'add_documenter'
The full traceback has been saved in /var/folders/vz/gcfll7gd04z1sbzr9kv2phn80000gn/T/sphinx-err-qijxis7s.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
The traceback looks like:
# Sphinx version: 2.4.4
# Python version: 3.7.6 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.1
# Last messages:
# Loaded extensions:
Traceback (most recent call last):
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/cmd/build.py", line 275, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/application.py", line 245, in __init__
self.setup_extension(extension)
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/application.py", line 397, in setup_extension
self.registry.load_extension(self, extname)
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/registry.py", line 465, in load_extension
metadata = setup(app)
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/invocations/autodoc.py", line 90, in setup
autodoc.add_documenter(TaskDocumenter)
File "/Users/sambriggs/.local/share/virtualenvs/cookiecutter-pypackage-oT8-zJK2/lib/python3.7/site-packages/sphinx/deprecation.py", line 49, in __getattr__
return getattr(self._module, name)
AttributeError: module 'sphinx.ext.autodoc' has no attribute 'add_documenter'
The offending line carries an explanation of why the extension is calling an internal API:
NOTE: sooo for now, since a bunch of our other shit breaks on Sphinx 1.7, we are just explicitly calling autodoc's add_documenter. Sadface.
But it looks like now is the time that it needs fixing!
invocations/invocations/autodoc.py
Line 90 in b3fdef7
| autodoc.add_documenter(TaskDocumenter) |
Reacted by Tomasz Kłoczko
Metadata
Metadata
Assignees
Labels
No labels
Activity
kloczek commentedon May 14, 2022
Just tested 2.6.0 and looks like issue still is around ..
anernest commentedon Jun 2, 2022
I'm getting a 'getargspec' error with Sphinx v5.0.0
Sphinx's deprecated list recommend pulling it from 'inspect', which in turn results in the 'add_documenter' error...
`Running Sphinx v5.0.0
Extension error:
Could not import extension invocations.autodoc (exception: cannot import name 'getargspec' from 'sphinx.util.inspect' (/home/anernest/Tier1Implementation/.venv/lib/python3.8/site-packages/sphinx/util/inspect.py))
make: *** [Makefile:28: html] Error 2`
kasium commentedon Nov 22, 2023
I had a similar issue with invoke and sphinx and created https://github.com/SAP/invoke-plugin-for-sphinx to document invoke tasks properly. Maybe this finds it's way into invoke in the near future.
Disclaimer: I'm the author of invoke-plugin-for-sphinx
kloczek commentedon Jun 3, 2024
Currently with sphinx 7.3.7 I have completely different fail