The Unity SDK documentation does not build on a current Sphinx. sphinx-build aborts before
writing any HTML.
sphinx.errors.ThemeError: An error happened in rendering the page home.
Reason: TypeError("argument of type '_CascadingStyleSheet' is not a container or iterable")
Cause
Docs/source/_templates/layout.html uses the pre-Sphinx-4 CSS API:
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" ... />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
From Sphinx 4 onward css_files holds _CascadingStyleSheet objects rather than strings, so the
else branch passes an object to pathto(). AltTester® Desktop's equivalent template was already
modernised to use css_tag(); this one was not. The Unreal SDK is unaffected.
Why it matters
deploy-docs-to-live.yml uploads with rm: true, which clears the target directory before
the upload. A build producing zero pages after that step has already run would leave the published
Unity documentation empty.
docs/requirements.txt pins no versions, so which Sphinx a runner resolves is not controlled.
Setup
- Windows 11, Python 3.14.6
- Sphinx 9.1.0, recommonmark 0.7.1, sphinx-rtd-theme 3.1.0
AltTester-Unity-SDK @ development, unmodified
Checks
- ☑️ Unmodified
Docs/source builds 0 pages and aborts
- ☑️ With the template fixed, builds 20 pages
- ☑️ AltTester® Desktop docs build unaffected (27 pages, same template pattern already in use)
- ☑️ Unreal SDK docs build unaffected (19 pages)
The Unity SDK documentation does not build on a current Sphinx.
sphinx-buildaborts beforewriting any HTML.
Cause
Docs/source/_templates/layout.htmluses the pre-Sphinx-4 CSS API:From Sphinx 4 onward
css_filesholds_CascadingStyleSheetobjects rather than strings, so theelsebranch passes an object topathto(). AltTester® Desktop's equivalent template was alreadymodernised to use
css_tag(); this one was not. The Unreal SDK is unaffected.Why it matters
deploy-docs-to-live.ymluploads withrm: true, which clears the target directory beforethe upload. A build producing zero pages after that step has already run would leave the published
Unity documentation empty.
docs/requirements.txtpins no versions, so which Sphinx a runner resolves is not controlled.Setup
AltTester-Unity-SDK@development, unmodifiedChecks
Docs/sourcebuilds 0 pages and aborts