You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If I have an object in one of my modules that raises some kind of error in its __getattr__, it will prevent sphinx (with autodocs) from building docs for said module.
To Reproduce
Put something like this in a file and try to generate docs for it.
Additional context
This bug was introduced with 3.0.2 in this commit: e9b6437#diff-48ca4d6544b092f35d729127500bff5fR581. I think it should be ok to just surround it with a bare try..except, since there is no info whatsoever which kind of errors a user might raise. In my case, it was flask's request proxy, which probably a few more people will run into. So here is part of the stacktrace to help them google the issue:
$ sphinx-build docs/ public/ -b html
Running Sphinx v3.0.2
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: [new config] 2 added, 0 changed, 0 removed
reading sources... [ 50%] autodoc/flask_shortcut
Exception occurred:
File "...\venv\lib\site-packages\flask\globals.py", line 38, in _lookup_req_object
raise RuntimeError(_request_ctx_err_msg)
RuntimeError: Working outside of request context.
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
The full traceback has been saved in ...\AppData\Local\Temp\sphinx-err-rzyl88fm.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!
The text was updated successfully, but these errors were encountered:
* Adding function mappings
- as it says on the tin, we can now add functions as route 'condition -> response' shortcuts
- I learned that "routing function" are actually called views, so I did some renaming
- fixed some documentation examples that were malformed
- nailing sphinx to 3.0.1 because of sphinx-doc/sphinx#7516
Describe the bug
If I have an object in one of my modules that raises some kind of error in its
__getattr__
, it will prevent sphinx (with autodocs) from building docs for said module.To Reproduce
Put something like this in a file and try to generate docs for it.
See also https://github.com/a-recknagel/Flask-Shortcut/pull/7/checks?check_run_id=600063576 for an actual error, the workflow and the run logs should give instructions on how reproduce it in detail.
Environment info
Additional context
This bug was introduced with 3.0.2 in this commit: e9b6437#diff-48ca4d6544b092f35d729127500bff5fR581. I think it should be ok to just surround it with a bare
try..except
, since there is no info whatsoever which kind of errors a user might raise. In my case, it was flask'srequest
proxy, which probably a few more people will run into. So here is part of the stacktrace to help them google the issue:The text was updated successfully, but these errors were encountered: