sphinx
sphinx copied to clipboard
TypeError: Directive.__init__() takes 10 positional arguments but 11 were given
Describe the bug
unknown extra arguments.
It reports 11 positional arguments given, but I only found 10.
In custom extension quickstart.py,line 38~40
ad = make_admonition(quickstart, self.name, ['Quickstart'], self.options, self.content, self.lineno, self.content_offset, self.block_text, self.state, self.state_machine)
This is the log file.
sphinx-err-p336d27h.log
How to Reproduce
git clone -b tagroles https://github.com/Ares-Developers/Ares-docs.git
cd Ares-docs-tagroles
pip install numpy
pip install numpydoc
pip install docutils
pip install sphinx
//and some other modules
//copy custom extension in "exts" folder into sphinx extension folder
//rename custom extension "roles.py" as "aresroles.py"(reference in conf.py also changed)
//edit custom extension "quickstart" (to fit updated sphinx):
//from sphinx.util.compat import Directive -> from docutils.parsers.rst import Directive
//from sphinx.util.compat import make_admonition -> from docutils.parsers.rst.directives.admonitions import BaseAdmonition as make_admonition
.\make html
pip module list Package Version
alabaster 0.7.12 Babel 2.10.3 certifi 2022.6.15 charset-normalizer 2.1.0 colorama 0.4.5 commonmark 0.9.1 docutils 0.17.1 idna 3.3 imagesize 1.4.1 Jinja2 3.1.2 livereload 2.6.3 Markdown 3.4.1 MarkupSafe 2.1.1 numpy 1.23.1 numpydoc 1.4.0 packaging 21.3 pip 22.2.1 Pygments 2.12.0 pyparsing 3.0.9 pytz 2022.1 recommonmark 0.7.1 requests 2.28.1 setuptools 63.2.0 six 1.16.0 snowballstemmer 2.2.0 Sphinx 5.1.1 sphinx-autobuild 2021.3.14 sphinx-markdown-tables 0.0.17 sphinx-rtd-theme 1.0.0 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 tornado 6.2 urllib3 1.26.11
Expected behavior
It should build a doc like this http://ares-developers.github.io/Ares-docs/index.html
Your project
https://github.com/Ares-Developers/Ares-docs/tree/tagroles
Screenshots

OS
Windows 10 64-bit
Python version
3.10.6
Sphinx version
5.1.1
Sphinx extensions
sphinx.ext.todo, sphinx.ext.ifconfig and 2 custom extensions
Extra tools
No response
Additional context
No response