Open DelazJ opened 10 months ago
Seeing the same problem on Linux. As a workaround, running under the LC_ALL=C.UTF-8
environment variable works.
I had the same problem under Linux as well while building QGIS documentation. Environment variable didn't work, but directly calling sphinx-build
worked
I don't know why it doesn't work and I think it would be too difficult to handle each corner case. At least it appears that there is a workaround for those on Linux. As for those on Mac, this will be hard to replicate since I don't use Mac.
Maybe your environment has some invalid locale settings or things like this? I think this issue will likely stay opened a long time because it's very hard to reproduce and I think it might be an issue with the OS itself.
This is likely due to https://github.com/sphinx-doc/sphinx/commit/c7d7f2951d0c43280f78c84b65df11d207ea6177. Previously we ignored locale errors (#5724) due to an issue in CPython (https://github.com/python/cpython/issues/62578#issuecomment-1093620758).
Please check in a Python console that import locale; locale.setlocale(locale.LC_ALL, '')
succeeds.
A
Please check in a Python console that
import locale; locale.setlocale(locale.LC_ALL, '')
succeeds.
I get 'fr_FR.UTF-8'. TBH I don't know what to do next 😢.
Is that running on Python 3.9? What's the output of the Python -VV
?
Yes
Python 3.9.6 (default, Nov 10 2023, 13:38:27) [Clang 15.0.0 (clang-1500.1.0.2.5)]
he lol, put it in a docker with us/utf-8 locale settings :D
same problem on an self-hosted ubuntu runner for github actions
Do you have any idea when this issue will be resolved? We have to pin the Sphinx version to 6.1.3.
sphinx-build -W -b epub -d _build/doctrees . _build/epub
Traceback (most recent call last):
File "/home/jenkins/workspace/pgadmin4-epub-snapshot/venv/bin/sphinx-build", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/jenkins/workspace/pgadmin4-epub-snapshot/venv/lib/python3.11/site-packages/sphinx/cmd/build.py", line 369, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python3.11/locale.py", line 626, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
I have tried all the workarounds above; nothing works on our build machines.
import locale; locale.setlocale(locale.LC_ALL, '')
Python fails with
en_US.UTF-8`
LC_ALL="en_US.UTF-8" python -c "import locale; locale.setlocale(locale.LC_ALL, '')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/thiagofc/miniconda/envs/dev311/lib/python3.11/locale.py", line 627, in setlocale
return _setlocale(category, locale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
but LC_ALL="C.UTF-8" python -c "import locale; locale.setlocale(locale.LC_ALL, '')"
succeeds
Describe the bug
Hi, I'm trying to build docs locally on a macOS machine with recent versions and running
make html
reportsSince my 4.x version of Sphinx buils without issue, and trying to understand, I found that this was a macOS issue worked around by https://github.com/sphinx-doc/sphinx/issues/5724 some time ago, and this patch was removed in https://github.com/sphinx-doc/sphinx/commit/c7d7f2951d0c43280f78c84b65df11d207ea6177 (I couldn't find the rationale but assumed because the issue on Python side is resolved?)
How to Reproduce
I think the issue relates to the OS and a Sphinx version >= 6.2.0. Any project could be used I think.
Environment Information
Sphinx extensions
No response
Additional context
No response