-
Notifications
You must be signed in to change notification settings - Fork 49
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
Locale issue #435
Labels
Comments
bouweandela
added
New: Issue
Highlight a new community raised "generic" issue
Type: Bug
labels
Jul 17, 2024
This was referenced Jul 17, 2024
I had a go at fixing this in #436, but there appear to be some issues with CI. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 Bug Report
cf_units
fails to import when theLC_NUMERIC
environmental variable is set to a locale that has a,
instead of a.
as thedecimal_point
character and Python sets the locale. This typically happens in documentation builds with sphinx. See pydata/xarray#4257 for an example. I have encountered the same issue when building the iris and ESMValCore documentation.How to Reproduce
Steps to reproduce the behaviour:
export LC_NUMERIC=nl_NL.UTF-8
locale
:Run the following Python code to set the locale
Expected Behaviour
A successful import.
Environment
Additional Context
When I comment out the
suppress_warnings
context manager herecf-units/cf_units/__init__.py
Line 182 in f57a7f1
I see the following error message:
some searching trough the udunits2 code suggests that it originates from using the
strtod
function in this code, which uses thedecimal-point
locale setting.The text was updated successfully, but these errors were encountered: