We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If the theme.conf file is missing, the code here:
theme.conf
sphinx/sphinx/theming.py
Line 72 in fcc3899
Line 77 in fcc3899
[theme]
It would be more helpful to raise an error saying that the theme.conf file is missing.
Just remove theme.conf from a theme and try to build some documentation with that theme.
Platform: linux; (Linux-4.15.0-213-generic-x86_64-with-glibc2.27) Python version: 3.10.8 (main, Nov 24 2022, 07:33:30) [GCC 7.5.0]) Python implementation: CPython Sphinx version: 7.2.5 Docutils version: 0.20.1 Jinja2 version: 3.1.2 Pygments version: 2.16.1
None
No response
The text was updated successfully, but these errors were encountered:
PR is welcomed.
You can first check the existence of the file and raise a warning accordingly. (The current check on the 'theme' setting should still be done)
If no one submits a PR, I'll have a look at it upon my return (late September).
Sorry, something went wrong.
Fix sphinx-doc#11668: Add check for non-existent theme.conf and fail …
f5c1ce3
…with a more informative error message.
Successfully merging a pull request may close this issue.
Describe the bug
If the
theme.conf
file is missing, the code here:sphinx/sphinx/theming.py
Line 72 in fcc3899
creates an empty configuration and fails a few lines later at
sphinx/sphinx/theming.py
Line 77 in fcc3899
because of course there's no
[theme]
section, as the file doesn't exist!It would be more helpful to raise an error saying that the
theme.conf
file is missing.How to Reproduce
Just remove
theme.conf
from a theme and try to build some documentation with that theme.Environment Information
Sphinx extensions
None
Additional context
No response
The text was updated successfully, but these errors were encountered: