QuantEcon / sphinxcontrib-jupyter

A Sphinx Extension for Generating Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
77 stars 23 forks source link

doc2path() takes from 2 to 3 positional arguments but 4 were given #339

Open nshaud opened 3 years ago

nshaud commented 3 years ago

When compiling a Sphinx with the jupyter target, I got this error:

File "(...)/lib/python3.9/site-packages/sphinxcontrib/jupyter/builders/jupyter.py", line 115, in get_outdated_docs
targetname = self.env.doc2path(docname, self.outdir,
TypeError: doc2path() takes from 2 to 3 positional arguments but 4 were given

I use Python 3.9.6, Sphinx 4.2.0 and sphinxcontrib-jupyter 0.5.10.

The signature of the doc2path seems to have changed in Sphinx. It now only takes 2 arguments (docname and base) instead of 3.

Removing self.out_suffix in jupyter.py seems to fix the error but I am unsure of the consequences of changing this.

I assume that jupyterpdf.py needs the same modification.