sphinx-doc / sphinx-doc/sphinx
inline_all_toctrees() contains a non-specific except block that masks other issues.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Problem
I'm using an extension that fails when using singlehtml, raising an exception during util/nodes.py:inline_all_toctrees(). The extension's node class doesn't play nice with _new_copy(), apparently. The exception is caught by the bare except Exception: line in util/nodes.py:inline_all_toctrees(), emitting a warning that a referenced document does not exist, even though the document does exist and the error is something else entirely.
Expected results
I think ideally this except block would only trigger on Exceptions that actually result from nonexistent files, letting all other exceptions bubble up.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in util/nodes.py at inline_all_toctrees() and reproduce the singlehtml failure with the extension's node class and _new_copy(). Trace which exception produces the nonexistent-document warning, then verify that only missing-document cases emit it while unrelated extension errors bubble up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100