Summary
The CD docs job fails at mkdocs build (via mike deploy) rendering
api/auth.md, crashing in the mkdocstrings-python source highlighter:
ERROR - Error reading page 'api/auth.md': 'NoneType' object has no attribute 'replace'
File ".../mkdocstrings_handlers/python/_internal/handler.py", line 264, in render
File ".../mkdocstrings_handlers/python/templates/material/_base/class.html.jinja", line 272, in block 'source'
File ".../mkdocstrings/_internal/handlers/rendering.py", line 120, in highlight
AttributeError: 'NoneType' object has no attribute 'replace'
error: Command '['mkdocs', 'build', '--clean', '--config-file', '.../mike-mkdocs....yml']' returned non-zero exit status 1
Context
Locked docs toolchain (uv.lock)
- mkdocs 1.6.1, mkdocs-material 9.7.3
- mkdocstrings 1.0.3, mkdocstrings-python 2.0.3
- pymdown-extensions 10.21, pygments 2.20.0
pyproject.toml pins only mkdocs-material and mkdocstrings[python]
(unversioned), so uv resolved the latest majors (mkdocstrings 1.0,
mkdocstrings-python 2.0). The crash is in the source block highlight, i.e.
show_source rendering of an object documented in api/auth.md
(pymqrest.auth).
Plan
- Investigate root cause first (no changes yet): reproduce locally, and
determine exactly why highlight() receives None for api/auth.md — a
specific object/docstring construct vs. a mkdocstrings-python 2.0 regression.
- Choose the fix from findings: pin the docs toolchain to the last building
version (preferred if it's a regression), adjust mkdocstrings options, or fix
a source construct — and report upstream if it's a library bug.
Acceptance
- CD
docs job builds and deploys cleanly on develop.
- Fix validated (docs build green) before merge.
References
- Exposed by:
mq-rest-admin-python#510 → PR #511 (item 7 secrets: inherit)
- Fleet epic:
mq-rest-admin-project/.github#14
Summary
The CD
docsjob fails atmkdocs build(viamike deploy) renderingapi/auth.md, crashing in the mkdocstrings-python source highlighter:Context
breakage that the CD
startup_failure(item 7, fixed in chore(tooling): refresh managed config + source credentials from env #511) had beenmasking since 2026-05-27. Fixing item 7 un-blocked the
docsjob, which nowactually runs
mkdocs buildand fails.Python source via mkdocstrings.
Locked docs toolchain (uv.lock)
pyproject.tomlpins onlymkdocs-materialandmkdocstrings[python](unversioned), so uv resolved the latest majors (mkdocstrings 1.0,
mkdocstrings-python 2.0). The crash is in the
sourceblock highlight, i.e.show_sourcerendering of an object documented inapi/auth.md(
pymqrest.auth).Plan
determine exactly why
highlight()receivesNoneforapi/auth.md— aspecific object/docstring construct vs. a mkdocstrings-python 2.0 regression.
version (preferred if it's a regression), adjust mkdocstrings options, or fix
a source construct — and report upstream if it's a library bug.
Acceptance
docsjob builds and deploys cleanly on develop.References
mq-rest-admin-python#510→ PR#511(item 7secrets: inherit)mq-rest-admin-project/.github#14