Skip to content

Crash in Python doc build #3600

@JelleZijlstra

Description

@JelleZijlstra

Subject: Crash on CPython docs, python/cpython#967

Problem

  • Sphinx crashed with an UnboundLocalError.

Procedure to reproduce the problem

./venv/bin/python -m sphinx -b suspicious -d build/doctrees -D latex_elements.papersize= -q -W . build/suspicious 

Error logs / results

./venv/bin/python -m sphinx -b suspicious -d build/doctrees -D latex_elements.papersize= -q -W . build/suspicious 
Exception occurred:
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/sphinx/domains/python.py", line 317, in before_content
    if prefix:
UnboundLocalError: local variable 'prefix' referenced before assignment
The full traceback has been saved in /tmp/sphinx-err-o5k5mazo.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!
make[1]: *** [build] Error 1
make[1]: Leaving directory `/home/travis/build/python/cpython/Doc'
Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv.  If all issues are false positives, append that file to tools/susp-ignored.csv.
make: *** [suspicious] Error 1

Expected results

Reproducible project / your project

Environment info

  • OS: <Unix/Linux/Mac/Win/other with version>
  • Python version:
  • Sphinx version:
  • <Extra tools e.g.: Browser, tex or something else>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions