sphinx-doc / sphinx-doc/sphinx

ExtensionError (sphinx.ext.intersphinx._load) : exception: not enough arguments for format string

Open
#14,029 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When the intersphinx inventory is reached through a SSL-aware HTTP proxy (standard in company networks), there might be a redirect happening.
This redirect seems to trigger a bug in the intersphinx._load code

loading intersphinx inventory 'python' from https://docs.python.org/3/objects.inv ...
intersphinx inventory has moved: https://docs.python.org/3/objects.inv -> https://<private.proxyhost.net>:<port>/<path>?origurl=https%3A%2F%2Fdocs.python.org%2F3%2Fobjects.inv&<other parameters>

Extension error (sphinx.ext.intersphinx._load)!

Versions
========

* Platform:         win32; (Windows-11-10.0.22631-SP0)
* Python version:   3.12.11 (CPython)
* Sphinx version:   8.2.3
* Docutils version: 0.21.2
* Jinja2 version:   3.1.6
* Pygments version: 2.19.2

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

None.

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

None.

Traceback
=========

      File "C:\_dev\python_ws\16_vne\python-dq4ts-lib\.nox\doc\Lib\site-packages\sphinx\events.py", line 415, in emit
        raise ExtensionError(
    sphinx.errors.ExtensionError: Handler <function load_mappings at 0x000001A834D14720> for event 'builder-inited' threw an exception (exception: not enough arguments for format string)
How to Reproduce

Simply run sphinx with at least one intersphinx link (for example documenting a class that extends stdlib str, or referencing :class:str in one of the rst documents)

Environment Information
Platform:              win32; (Windows-11-10.0.22631-SP0)
Python version:        3.12.11 (main, Sep 18 2025, 19:45:51) [MSC v.1944 64 bit (AMD64)])
Python implementation: CPython
Sphinx version:        8.2.3
Docutils version:      0.21.2
Jinja2 version:        3.1.6
Pygments version:      2.19.2
Sphinx extensions
`sphinx.ext.intersphinx`
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sphinx.ext.intersphinx._load entry point and reproduce the failure with an intersphinx link through an SSL-aware HTTP proxy that redirects the inventory request. Done means the redirected inventory loads without the “not enough arguments for format string” ExtensionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.