Skip to content

Unity SDK documentation fails to build on Sphinx 4+ #1989

Description

@adrianbobis-blip

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)

Activity

  1. adrianbobis-blip commented on Sep 18, 2026

    @adrianbobis-blip
    Author

    Folded into the documentation update issues, which are the sub-issues of alttester/alttester-unreal-sdk#328:

    The fix itself is unaffected and still open for review:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions