GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to generate POT for Python documentation · Issue #104284 · python/cpython

Unable to generate POT for Python documentation #104284

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to generate POT for Python documentation#104284
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@rffontenelle
rffontenelle
opened on May 8, 2023
Issue body actions

Bug report

I coordinate Brazilian Portuguese translation of the Python documentation. As part of the translation update process, I run sphinx-build's gettext builder to generate POT (translation files template) and update translations.

Since 3 days ago I'm unable to successfully generate POT files because the gettext builder fails for me with the following output:

 ...
reading sources... [ 14%] distutils/apiref                                                                          
Exception occurred:
  File "/home/rffontenelle/cpython/Doc/venv/lib/python3.11/site-packages/sphinx/domains/python.py", line 1043, in run
    indextext = '%s; %s' % (pairindextypes['module'], modname)
                            ~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'module'
The full traceback has been saved in /tmp/sphinx-err-ds0bs43h.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:53: build] Error 2

The log file containing the full traceback: sphinx-err-ds0bs43h.log

This might be related to #104000.

Steps to reproduce:

  • cd cpython/Doc
  • git switch 3.11 # current target of translation efforts
  • make venv
  • make ALLSPHINXOPTS='-b gettext -d build/doctrees . locales/pot' build

Your environment

  • CPython versions tested on: 3.11 and 3.10
  • Operating system and architecture: Arch Linux x86_64 and Ubuntu 22.04 (GitHub runner image)
  • Packages installed by make venv: Jinja2-3.1.2 MarkupSafe-2.1.2 Pygments-2.15.1 alabaster-0.7.13 babel-2.12.1 blurb-1.1.0 certifi-2023.5.7 charset-normalizer-3.1.0 contourpy-1.0.7 cycler-0.11.0 docutils-0.17.1 fonttools-4.39.3 idna-3.4 imagesize-1.4.1 kiwisolver-1.4.4 matplotlib-3.7.1 numpy-1.24.3 packaging-23.1 pillow-9.5.0 polib-1.2.0 pyparsing-3.0.9 python-dateutil-2.8.2 python-docs-theme-2023.3.1 regex-2023.5.5 requests-2.30.0 six-1.16.0 snowballstemmer-2.2.0 sphinx-4.5.0 sphinx-lint-0.6.7 sphinxcontrib-applehelp-1.0.4 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 sphinxext-opengraph-0.8.2 urllib3-2.0.2

Linked PRs

  • GH-104284: Fix documentation gettext build #104296
  • [3.11] GH-104284: Fix documentation gettext build (GH-104296) #104299

Activity

  1. rffontenelle
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 8, 2023
  2. AlexWaygood commented on May 8, 2023

    @AlexWaygood
    AlexWaygood
    on May 8, 2023
    Member
    More actions

    This might be related to #104000.

    Cc. @AA-Turner

  3. hugovk commented on May 8, 2023

    @hugovk
    hugovk
    on May 8, 2023
    Member
    More actions

    Checking with the excellent git bisect tool (https://thoughtbot.com/blog/git-bisect):

    Starting with 0d40264 from 1st May as a good starting commit and current 3.11 (19abf69) as the bad one:

    git bisect start
    git bisect good 0d4026432591d43185568dd31cef6a034c4b9261
    git bisect bad 3.11

    and automating the bisect (from repo root):

    git bisect run make -C Doc clean venv ALLSPHINXOPTS='-b gettext -d build/doctrees . locales/pot' build

    Points to commit 0056369 from backport PR #104154, main PR #103996 and issue #97950:

    00563694bb94f61ed4d8d36646a881ed6f028367 is the first bad commit
    commit 00563694bb94f61ed4d8d36646a881ed6f028367
    Author: Adam Turner <[email protected]>
    Date:   Thu May 4 09:39:15 2023 +0100
    
        [3.11] GH-97950: Use new-style index directive ('module') (GH-103996) (#104154)
    
     Doc/c-api/exceptions.rst              |  6 +++---
     Doc/c-api/init.rst                    | 14 +++++++-------
     Doc/c-api/intro.rst                   |  6 +++---
     Doc/library/_thread.rst               |  2 +-
     Doc/library/binascii.rst              |  4 ++--
     Doc/library/cmath.rst                 |  2 +-
     Doc/library/copy.rst                  |  2 +-
     Doc/library/copyreg.rst               |  4 ++--
     Doc/library/exceptions.rst            |  2 +-
     Doc/library/fnmatch.rst               |  4 ++--
     Doc/library/functions.rst             |  4 ++--
     Doc/library/http.client.rst           |  2 +-
     Doc/library/internet.rst              |  2 +-
     Doc/library/locale.rst                |  4 ++--
     Doc/library/marshal.rst               |  4 ++--
     Doc/library/os.path.rst               |  2 +-
     Doc/library/os.rst                    |  4 ++--
     Doc/library/pdb.rst                   |  4 ++--
     Doc/library/posix.rst                 |  2 +-
     Doc/library/pwd.rst                   |  2 +-
     Doc/library/pyexpat.rst               |  2 +-
     Doc/library/runpy.rst                 |  4 ++--
     Doc/library/shelve.rst                |  6 +++---
     Doc/library/site.rst                  |  4 ++--
     Doc/library/socket.rst                |  2 +-
     Doc/library/stdtypes.rst              |  8 ++++----
     Doc/reference/compound_stmts.rst      |  2 +-
     Doc/reference/datamodel.rst           |  8 ++++----
     Doc/reference/executionmodel.rst      |  2 +-
     Doc/reference/toplevel_components.rst |  8 ++++----
     Doc/tools/extensions/pyspecific.py    |  6 +-----
     Doc/tutorial/inputoutput.rst          |  2 +-
     Doc/tutorial/modules.rst              |  4 ++--
     33 files changed, 65 insertions(+), 69 deletions(-)
    bisect found first bad commit
    

    And confirming the previous commit 8f94c94 does build.

    @AA-Turner, please could you check this?

    Reacted by Rafael Fontenelle
  4. hugovk
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on May 8, 2023
  5. AA-Turner commented on May 8, 2023

    @AA-Turner
    AA-Turner
    on May 8, 2023
    Member
    More actions

    Will look later this afternoon, thank you for the notes!

    A

    Reacted by Hugo van Kemenade
  6. AA-Turner commented on May 8, 2023

    @AA-Turner
    AA-Turner
    on May 8, 2023
    Member
    More actions

    I've put up a PR that I believe fixes this (@rffontenelle would you be able to test, please?).

    As analyis, I believe my previous local testing passed as I had a cached set of doctrees in my build folder, and seemingly didn't use the -E option when testing. The fix changes the patching period to come just before writing the POT files.

    A

  7. hugovk
    added a commit that references this issue on May 8, 2023

    GH-104284: Fix documentation gettext build (#104296)

    942482c
  8. miss-islington
    added a commit that references this issue on May 8, 2023

    pythonGH-104284: Fix documentation gettext build (pythonGH-104296)

    c27f2e0
  9. jbower-fb
    added a commit that references this issue on May 8, 2023

    pythonGH-104284: Fix documentation gettext build (python#104296)

    b8116d8
  10. hugovk
    added a commit that references this issue on May 8, 2023

    [3.11] GH-104284: Fix documentation gettext build (GH-104296) (#104299)

    2ee2503
  11. hugovk commented on May 8, 2023

    @hugovk
    hugovk
    on May 8, 2023
    Member
    More actions

    Fixed in main and backported to 3.11. Thanks both!

  12. hugovk
    closed this as completedon May 8, 2023
  13. carljm
    added 4 commits that reference this issue on May 9, 2023

    Merge branch 'main' into inlinecomp2

    76077cd

    Merge branch 'main' into fixsendfamily

    a614216

    Merge branch 'main' into supermon

    c48eee3

    Merge branch 'main' into fixloadsuperspec

    cf11908
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

    docsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.