-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[macOS] Unable to "make html" due to locale.Error: unsupported locale setting #11739
Comments
Seeing the same problem on Linux. As a workaround, running under the |
I had the same problem under Linux as well while building QGIS documentation. Environment variable didn't work, but directly calling |
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 c7d7f29. Previously we ignored locale errors (#5724) due to an issue in CPython (python/cpython#62578 (comment)). Please check in a Python console that A |
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 |
Yes
|
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.
I have tried all the workarounds above; nothing works on our build machines. |
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 |
Is there any update on this? |
I have no access to macOS hardware, so it is hard to fix this myself. This is an open-source project so we don't have funds to get a Mac, and all development is done by volunteers. I use Windows and I believe most other regular contributors use some variant of Linux. I am happy to review and accept a PR to fix this, though. A |
I have added macOS to the GitHub Actions CI in #13284, but no A |
@AA-Turner I don't know if this is the kind of information you are looking for or if even helpful, but I made some tests here.
I'm not familiar with all these and don't know what switching to C only implies but here are what I came to. Hope that it sheds some light. |
Current and available locales can be listed on Unix-like systems with
There seems to be a bug in the Ubuntu image where all locales are set to For Sphinx, users currently need to set LC_ALL=en_US.utf8 sphinx-build ... The https://www.gnu.org/software/libc/manual/html_node/Standard-Locales.html The locale choice affects how locale-specific text is rendered (e.g. dates). |
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 #5724 some time ago, and this patch was removed in c7d7f29 (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
The text was updated successfully, but these errors were encountered: