-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
sphinx-build: error: argument -d/--maxdepth: invalid int value #5104
Description
I recently updated to the latest version of Sphinx and am now unable to build the documentation for my project.
Problem
When I try to build the documentation for my project, I encounter the following error message:
$ make
sphinx-build -b html -d _build/doctrees -E . _build/html
Running Sphinx v1.7.5
usage: sphinx-build [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN, ...]
sphinx-build: error: argument -d/--maxdepth: invalid int value: '_build/doctrees'
Configuration error:
The configuration file (or one of the modules it imports) called sys.exit()
make: *** [html] Error 2
Procedure to reproduce the problem
$ git clone https://github.com/spack/spack.git
$ cd spack/lib/spack/docs
$ make
Error logs / results
This was first reported in spack/spack#8491 (comment). This issue appears to be identical to readthedocs/readthedocs-build#44. The RtD issue suggests locking the version of Sphinx to 1.7.0. Indeed, this issue has never caused us trouble as we lock our version to 1.7.0 for Travis and RtD, but I would like to be able to build the docs locally.
Expected results
The docs should build correctly. According to sphinx-build --help, -d should accept a path, not an int:
-d PATH path for the cached environment and doctree files
(default: OUTPUTDIR/.doctrees)
Perhaps this is coming from sphinx-apidoc?
-d MAXDEPTH, --maxdepth MAXDEPTH
maximum depth of submodules to show in the TOC
(default: 4)
Reproducible project / your project
https://github.com/spack/spack
Environment info
- OS: macOS 10.13.5
- Python version: 3.6.4
- Sphinx version: 1.7.5