Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-d/--maxdepth: invalid int value: '_build/doctrees-readthedocs' #3769

Closed
jakirkham opened this issue Mar 11, 2018 · 14 comments
Closed

-d/--maxdepth: invalid int value: '_build/doctrees-readthedocs' #3769

jakirkham opened this issue Mar 11, 2018 · 14 comments
Labels
Support Support question

Comments

@jakirkham
Copy link
Contributor

Details

Expected Result

The docs would build.

Actual Result

Snippet taken from the linked log above.

$ python /home/docs/checkouts/readthedocs.org/user_builds/dask-image/conda/latest/bin/sphinx-build -T -b readthedocs -d _build/doctrees-readthedocs -D language=en . _build/html

Running Sphinx v1.7.1
loading translations [en]... done
making output directory...
loading pickled environment... not yet created
usage: usage: sphinx-build [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> [EXCLUDE_PATTERN, ...]
sphinx-build: error: argument -d/--maxdepth: invalid int value: '_build/doctrees-readthedocs'
@humitos
Copy link
Member

humitos commented Mar 13, 2018

Giving a little more of context, the command is called at https://github.com/rtfd/readthedocs.org/blob/8f2d59cdcdee0050feece79465d1a6c5c903ecf5/readthedocs/doc_builder/backends/sphinx.py#L195-L204

It's weird that it says -d/--maxdepth as it one is the short form and the other the long form, but the sphinx-build documentation says that -d is a path, not an int: http://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-d

So, maybe something is wrong in Sphinx itself? :/

@jakirkham
Copy link
Contributor Author

@humitos
Copy link
Member

humitos commented Mar 13, 2018

@jakirkham probably... do you know why this is happening? how do we use one -d (from Sphinx) or the other (from apidoc)?

@arh89
Copy link

arh89 commented Mar 16, 2018

I am seeing the same issue with a project that I work on - it seems to be either a bug or change in behaviour with the update from sphinx 1.7.0 to 1.7.1. Is there a straightforward way to force RTD to use v1.7.0?

@humitos
Copy link
Member

humitos commented Mar 16, 2018

@arh89 yes, you can create a docs/requirements.txt (or similar) and pin the packages as you need and use the YAML config: http://docs.readthedocs.io/en/latest/yaml-config.html#requirements-file

martingalloar added a commit to OWASP/pysap that referenced this issue Mar 17, 2018
Fixed the Sphinx version to a newer version but < than 1.7.1 due to readthedocs/readthedocs.org#3769.
@cdwilson
Copy link

Pinning sphinx==1.7.0 in requirements.txt fixed this for me also. I'm getting the same error with 1.7.1.

@humitos
Copy link
Member

humitos commented Mar 21, 2018

Thanks @cdwilson!

I'm closing this issue since it's not a RTD bug or similar but a problem between sphinx and apidoc, and we already have the workaround proposed by @cdwilson.

Feel free to reopen if you consider. Thanks!

@humitos humitos closed this as completed Mar 21, 2018
@jakirkham
Copy link
Contributor Author

Unfortunately that doesn't work for us, @humitos. 😞

We are currently pinning Sphinx, but it appears that RTD overrides us later, which is causing the problem. Having our Sphinx version constraint respected by RTD would solve this issue for us on the RTD side.

Also can't reopen the issue as GitHub disallows users without write permissions to reopen issues closed by others.

@humitos
Copy link
Member

humitos commented Mar 21, 2018

@jakirkham thanks for your report.

This is a different problem I'd say since here, even that you are pinning the sphinx version via conda YAML file, RTD is running this command after yours:

 conda install --yes --name latest mock pillow sphinx sphinx_rtd_theme 

and then conda upgrades the sphinx package to the latest version. Can you open a new issue with an explanation to track this separately?

@jakirkham
Copy link
Contributor Author

Thanks @humitos. Agree that it is a different problem. Have raised as issue ( #3829 ). Please let me know if there is anything else we should add to that.

@jakirkham
Copy link
Contributor Author

Do you have any ideas what might be happening here, @tk0miya?

asampat3090 added a commit to datmo/datmo that referenced this issue May 7, 2018
…val to developer readme

* master: (48 commits)
  remove deprecated warn command (should be warning) and made logger compatible with python 3
  uploaded 0.0.2 to pypi and moved to 0.0.3-dev version
  updated developer README.md with upload instructions for PyPI
  test and verify examples in examples/ directory and update for clarification
  fix handler issue by importing handlers module from logging
  fix code to work on python 2 and 3
  yapf run on all module files and setup.py
  hotfix: add handling for testing locally on 1.7.4 sphinx and removed debug statements
  hotfix: clean up docs and add add debugging statements for readthedocs
  hotfix: try different sphinx version to fix issue as per: readthedocs/readthedocs.org#3769
  hotfix: revert to conda install for readthedocs with autosummary False
  hotfix: move to python 2.7 for readthedocs.
  hotfix: remove conda config and autosummary from docs
  hotfix: enabled docs build to emulate the readthedocs build and fix issues
  fix to have snapshot visible during snapshot create with cli
  adding results in task ls cli command
  fix broken unvalidated appveyor.yml file from master
  using yapf and adding test for parallel task run
  add `datmo version`, `datmo --version`, `datmo -v` commands for versions + moved to common VERSION file included in datmo package build
  removing gpu bool as an argument in task
  ...

Conflicts:
	datmo/cli/command/task.py
	datmo/cli/command/tests/test_task.py
	datmo/cli/main.py
	datmo/cli/parser.py
	datmo/config.py
	datmo/core/controller/environment/driver/dockerenv.py
	datmo/core/controller/environment/driver/tests/test_dockerenv.py
	datmo/core/controller/environment/tests/test_environment.py
	datmo/core/controller/task.py
	datmo/core/controller/tests/test_task.py
	datmo/core/entity/task.py
	datmo/core/storage/local/tests/test_dal_session.py
	datmo/core/storage/local/tests/test_dal_snapshot.py
	datmo/core/storage/local/tests/test_dal_task.py
	datmo/core/util/misc_functions.py
	datmo/core/util/tests/test_logger.py
asampat3090 added a commit to datmo/datmo that referenced this issue May 8, 2018
* master: (66 commits)
  yapf run on branch to ensure clean tests
  removed incorrect appveyor yaml configuration.
  created Config.cache_setting decorator to speed up expensive settings #37
  added env vars: logging_level=DEBUG when testing
  moved tests
  remove deprecated warn command (should be warning) and made logger compatible with python 3
  uploaded 0.0.2 to pypi and moved to 0.0.3-dev version
  updated developer README.md with upload instructions for PyPI
  test and verify examples in examples/ directory and update for clarification
  fix handler issue by importing handlers module from logging
  fix code to work on python 2 and 3
  yapf run on all module files and setup.py
  hotfix: add handling for testing locally on 1.7.4 sphinx and removed debug statements
  hotfix: clean up docs and add add debugging statements for readthedocs
  hotfix: try different sphinx version to fix issue as per: readthedocs/readthedocs.org#3769
  hotfix: revert to conda install for readthedocs with autosummary False
  hotfix: move to python 2.7 for readthedocs.
  hotfix: remove conda config and autosummary from docs
  hotfix: enabled docs build to emulate the readthedocs build and fix issues
  fix to have snapshot visible during snapshot create with cli
  ...
erwanp added a commit to radis/radis that referenced this issue May 9, 2018
franzinc pushed a commit to franzinc/agraph-python that referenced this issue May 29, 2018
Since 1.7.1 seems to be broken:
readthedocs/readthedocs.org#3769

Change-Id: I4ff6458265c81fee2f83a6b0e271bf84fc35fa20
Reviewed-on: https://gerrit.franz.com:9080/10912
Reviewed-by: Tadeusz Sznuk <[email protected]>
Tested-by: Hudson <[email protected]>
Reviewed-by: Ahmon Dancy <[email protected]>
@adamjstewart
Copy link

For anyone else who encounters this issue, I opened up an issue with Sphinx directly. In my case, the problem is caused by calling sphinx.apidoc.main inside of my conf.py. sphinx.apidoc.main is erroneously pulling in command-line args from sphinx-build, causing the error message you see. See sphinx-doc/sphinx#5104 for more details.

@jakirkham
Copy link
Contributor Author

Thanks for opening the upstream issue, @adamjstewart 😄

@jakirkham
Copy link
Contributor Author

Added a workaround that solved the issue for me in this comment.

wence- pushed a commit to firedrakeproject/ufl that referenced this issue May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

6 participants