Skip to content

Build fails on Sphinx 9.x #47

@mishaturnbull

Description

@mishaturnbull

Hey there, thanks for this project! Solves exactly a problem I'm having (private vs. public documentation).

I was able to get this working on Sphinx 8.0.2 (simply what I happened to have laying around already installed). However, it failed on my CI agent and the only notable difference is Sphinx 9.1.0. I updated my local installation to 9.1.0 and was able to reproduce the problem exactly.

The full output is:

misha@spareparts$ make clean html
Removing everything under 'build'...
Running Sphinx v9.1.0
loading translations [en]... done
making output directory... done
Read in collections ...

Extension error (sphinx_collections.collections)!

Versions
========

* Platform:         linux; (Linux-6.12.58-gentoo-x86_64-AMD_Ryzen_9_7940HS_w-_Radeon_780M_Graphics-with-glibc2.42)
* Python version:   3.13.0 (CPython)
* Sphinx version:   9.1.0
* Docutils version: 0.21.2
* Jinja2 version:   3.1.4
* Pygments version: 2.19.1

Last Messages
=============

None.

Loaded Extensions
=================

None.

Traceback
=========

      File "/home/misha/.pyenv/versions/3.13.0/lib/python3.13/site-packages/sphinx/events.py", line 452, in emit
        raise ExtensionError(
        ...<3 lines>...
        ) from exc
    sphinx.errors.ExtensionError: Handler <function collect_collections at 0x7fc6c5a3d9e0> for event 'config-inited' threw an exception (exception: 'Tags' object has no attribute 'tags')


The full traceback has been saved in:
/tmp/sphinx-err-nrfe6g1i.log

To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks!
Please also report this if it was a user error, so that a better error message can be provided next time.
make: *** [Makefile:20: html] Error 2

I get the same output from running sphinx-build -b html -t private source/ build/html/ as well.

The relevant sections of my conf.py are as follows:

extensions = [
        "sphinx_collections",
        "sphinx_immaterial",
        "sphinx.ext.todo",
        ]
 ...

collections = {
        "private": {
            "driver": "git",
            "source": "redacted-clone-url/private.git",
            "tags": ["private"],
            },
        }

In my case, it's easy enough to pin Sphinx to 8.x -- but figured I'd report this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions