Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix japanese doc build error #144

Merged
merged 2 commits into from
Jan 17, 2023

Conversation

take6
Copy link
Contributor

@take6 take6 commented Jan 9, 2023

Changes aims to fix the problem on building Japanese PDF doc reported the following issue.

python/python-docs-ja#35

I've confirmed the the error disappeared in the build of Python 3.11 documentation on Docker container based on Ubuntu 22.04.

Please note that this fix is a workaround to avoid confronting error rather than the one to fix essential problem. Given that the U+C4CF is Korean character, I added an option to use Korean latex package. It is weird that Korean latex package is required to build Japanese documentation. But it appears that it somehow works.

Any suggestions are welcome. Thanks in advance!

Use kotex package as the error claims that tex failed to process Korean character.
@JulienPalard
Copy link
Member

Let's try this, thanks for working on it.

@JulienPalard JulienPalard merged commit ec33098 into python:main Jan 17, 2023
@take6
Copy link
Contributor Author

take6 commented Jan 19, 2023

Hi @JulienPalard,

Did it work? If not, I think it's better to revert the change.

@JulienPalard
Copy link
Member

Damned, it did not worked, I see this in the logs:

ERROR:2023-01-19 03:20:22,652:Run: "make -C /srv/docsbuild/cpython/Doc PYTHON=/srv/docsbuild/venv-3.10/bin/python SPHINXBUILD=/srv/docsbuild/venv-3.10/bin/sphinx-build BLURB=/srv/docsbuild/venv-3.10/bin/blurb VENVDIR=/srv/docsbuild/venv-3.10 'SPHINXOPTS=-D latex_engine=platex -D latex_elements.inputenc= -D latex_elements.fontenc= -D latex_elements.preamble=\\\\usepackage{kotex} -q -D locale_dirs=/srv/docsbuild/3.10/locale -D language=ja -D gettext_compact=0' SPHINXERRORHANDLING= autobuild-stable" KO:
    Output written on howto-sockets.dvi (6 pages, 23272 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 1
          Refer to 'howto-sockets.log' for details
    Latexmk: Use the -f option to force complete processing,
     unless error was exceeding maximum runs, or warnings treated as errors.
    === TeX engine is 'e-pTeX'
    Latexmk: Errors, so I did not complete making targets
    make[3]: *** [Makefile:30: howto-sockets.pdf] Error 12
    make[3]: Leaving directory '/srv/docsbuild/cpython/Doc/build/latex'
    make[2]: *** [Makefile:180: dist] Error 2
    make[2]: Leaving directory '/srv/docsbuild/cpython/Doc'
    make[1]: *** [Makefile:227: autobuild-dev] Error 2
    make[1]: Leaving directory '/srv/docsbuild/cpython/Doc'
    make: *** [Makefile:237: autobuild-stable] Error 2
    make: Leaving directory '/srv/docsbuild/cpython/Doc'

ERROR:2023-01-19 03:20:22,737:Exception while building ja version 3.10
Traceback (most recent call last):
  File "/srv/docsbuild/scripts/build_docs.py", line 675, in run
    self.build()
  File "/srv/docsbuild/scripts/build_docs.py", line 758, in build
    run(
  File "/srv/docsbuild/scripts/build_docs.py", line 297, in run
    result.check_returncode()
  File "/usr/lib/python3.10/subprocess.py", line 456, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['make', '-C', '/srv/docsbuild/cpython/Doc', 'PYTHON=/srv/docsbuild/venv-3.10/bin/python', 'SPHINXBUILD=/srv/docsbuild/venv-3.10/bin/sphinx-build', 'BLURB=/srv/docsbuild/venv-3.10/bin/blurb', 'VENVDIR=/srv/docsbuild/venv-3.10', 'SPHINXOPTS=-D latex_engine=platex -D latex_elements.inputenc= -D latex_elements.fontenc= -D latex_elements.preamble=\\\\usepackage{kotex} -q -D locale_dirs=/srv/docsbuild/3.10/locale -D language=ja -D gettext_compact=0', 'SPHINXERRORHANDLING=', 'autobuild-stable']' returned non-zero exit status 2.

JulienPalard added a commit that referenced this pull request Jan 19, 2023
JulienPalard added a commit that referenced this pull request Jan 19, 2023
@take6
Copy link
Contributor Author

take6 commented Jan 21, 2023

OK. @JulienPalard, thank you for the reverting the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants