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

Documentation build broken (api/flask with Sphinx v3.0.2) #42

Closed
jwhitlock opened this issue Apr 20, 2020 · 1 comment
Closed

Documentation build broken (api/flask with Sphinx v3.0.2) #42

jwhitlock opened this issue Apr 20, 2020 · 1 comment

Comments

@jwhitlock
Copy link
Member

The documentation build (tox -e py38-docs) fails when processing api/flask:

py38-docs run-test: commands[0] | sphinx-build -b html -d /Users/john/src/python-dockerflow/.tox/py38-docs/tmp/doctrees docs /Users/john/src/python-dockerflow/.tox/py38-docs/tmp/html
Running Sphinx v3.0.2
making output directory... done
loading intersphinx inventory from http://docs.djangoproject.com/en/stable/_objects/...
loading intersphinx inventory from http://flask.pocoo.org/docs/objects.inv...
loading intersphinx inventory from https://redis-py.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://flask-sqlalchemy.readthedocs.io/en/2.x/objects.inv...
loading intersphinx inventory from https://docs.python.org/objects.inv...
loading intersphinx inventory from https://whitenoise.readthedocs.io/en/stable/objects.inv...
loading intersphinx inventory from https://sanic.readthedocs.io/en/stable/objects.inv...
intersphinx inventory has moved: http://docs.djangoproject.com/en/stable/_objects/ -> http://docs.djangoproject.com/en/3.0/_objects/
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
intersphinx inventory has moved: http://flask.pocoo.org/docs/objects.inv -> https://flask.palletsprojects.com/en/1.1.x/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 13 source files that are out of date
updating environment: [new config] 13 added, 0 changed, 0 removed
reading sources... [  7%] api/django
reading sources... [ 15%] api/flask

Exception occurred:
  File "/Users/john/src/python-dockerflow/.tox/py38-docs/lib/python3.8/site-packages/flask/globals.py", line 52, in _find_app
    raise RuntimeError(_app_ctx_err_msg)
RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in some way. To solve
this, set up an application context with app.app_context().  See the
documentation for more information.
The full traceback has been saved in /var/folders/61/s6_xxhqd3nl27_vgq9fzjmkr0000gq/T/sphinx-err-yu9dmo2o.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
ERROR: InvocationError for command /Users/john/src/python-dockerflow/.tox/py38-docs/bin/sphinx-build -b html -d /Users/john/src/python-dockerflow/.tox/py38-docs/tmp/doctrees docs /Users/john/src/python-dockerflow/.tox/py38-docs/tmp/html (exited with code 2)

This appears to be an issue with automodule that can be worked around by using autoclass directly.

@jwhitlock
Copy link
Member Author

jwhitlock commented Apr 20, 2020

This error appears in this build with Sphinx v3.0.2:

https://travis-ci.org/github/mozilla-services/python-dockerflow/jobs/677082713#L391

But not in this one with Sphinx v3.0.1:

https://travis-ci.org/github/mozilla-services/python-dockerflow/jobs/676774347#L370

so maybe this is introduced in v3.0.2.

Update: May be tracked in sphinx-doc/sphinx#7516

@jwhitlock jwhitlock changed the title Documentation build broken (api/flask) Documentation build broken (api/flask with Sphinx v3.0.2) Apr 20, 2020
rerowep added a commit to rerowep/rero-ils that referenced this issue Apr 21, 2020
* Fixes version of Sphinx to < 3.0.2: mozilla-services/python-dockerflow#42
* Adds test for appnope in Pipfile.lock
* Fixes pipenv version to 2018.10.9
* Cleans run-test.sh

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rerowep/rero-ils that referenced this issue Apr 21, 2020
* Fixes version of Sphinx to < 3.0.2: mozilla-services/python-dockerflow#42
* Adds test for appnope in Pipfile.lock
* Fixes pipenv version to 2018.10.9
* Cleans run-test.sh

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
rerowep added a commit to rero/rero-ils that referenced this issue Apr 21, 2020
* Fixes version of Sphinx to < 3.0.2: mozilla-services/python-dockerflow#42
* Adds test for appnope in Pipfile.lock
* Fixes pipenv version to 2018.10.9
* Cleans run-test.sh

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
@jezdez jezdez closed this as completed in d7fadb7 Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant