python/python-docs-ja

Improper discretionary list

JulienPalard opened this issue · 6 comments

Since 2019-12-25, around the time we bumped to Sphinx 2.3.1, I see this error in the logs:

[5]
第 3 章
[6] (/usr/share/texlive/texmf-dist/tex/latex/psnfss/omspcr.fd)
! Improper discretionary list.
\textbackslash ...tionary {\sphinx@textbackslash }
                                                  {\sphinxafterbreak }{\sphi...
l.196 ...nxcode{\sphinxupquote{\textbackslash{}0}}
                                                   が埋め込まれていても大丈...
? 
! Emergency stop.
\textbackslash ...tionary {\sphinx@textbackslash }
                                                  {\sphinxafterbreak }{\sphi...
l.196 ...nxcode{\sphinxupquote{\textbackslash{}0}}
                                                   が埋め込まれていても大丈...
Output written on howto-sockets.dvi (6 pages, 23844 bytes).
Transcript written on howto-sockets.log.
Latexmk: Index file 'howto-sockets.idx' was written
Latexmk: References changed.
Collected error summary (may duplicate other messages):
  latex: Command for 'latex' gave return code 256
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: Errors, so I did not complete making targets
Makefile:35: recipe for target 'howto-sockets.pdf' failed

@cocoatomo I still see this issue, can someone take a look?

@jfbu might handle this issue, i think.
Anyway, examination of this issue needs information of environment, used tools and reproducing process.

I can reproduce it easily with a clone of docsbuild-scripts by running:

$ mkdir -p www logs build_root
$ python3 -m venv build_root/venv/
$ build_root/venv/bin/python -m pip install -r requirements.txt
$ python3 ./build_docs.py --build-root build_root --www-root www --log-directory logs --group $(id -g) --skip-cache-invalidation --language ja --branch 3.8

it clones what's needed, creates the appropriate symlink, and build, you should get:

ERROR:Command failed (see /home/mdk/clones/python/docsbuild-scripts/logs/cpython-ja-3.8.log at 2020-05-23 15:25:12.651117)

and the log file should contain the full exception:

$ grep -c Improper logs/cpython-ja-3.8.log 
1

I'm using Debian bullseye with the following packages:

  - build-essential
  - fonts-freefont-otf
  - git
  - python-dev
  - python-virtualenv
  - latexmk
  - texinfo
  - texlive
  - texlive-latex-extra
  - texlive-latex-recommended
  - texlive-fonts-recommended
  - texlive-lang-all
  - texlive-xetex
  - xindy
  - zip

We're still having the issue on docs.python.org.

I can still reproduce it locally:

! Improper discretionary list.
\textbackslash ...tionary {\sphinx@textbackslash }
                                                  {\sphinxafterbreak }{\sphi...
l.7196 ...e{}\textbackslash{}0\textquotesingle{}}}
                                                   upon return. They^^M

using:

make -C cpython/Doc  'SPHINXOPTS=-D latex_engine=platex -D latex_elements.inputenc= -D latex_elements.fontenc= -j4 -q -D locale_dirs=/home/mdk/clones/python/docsbuild-scripts/build_root/3.11/locale -D language=ja -D gettext_compact=0' SPHINXERRORHANDLING= autobuild-dev

/home/mdk/clones/python/docsbuild-scripts/build_root/3.11/locale contains ja/LC_MESSAGES/, a clone of this repo.