Skip to content

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

@nshaud

Description

@nshaud

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions