Closed axnj2 closed 3 weeks ago
Thanks for the (great) issue. You're the first user of yadg
I know about that uses Mac. Could you let me know which dgbowl-schemas
are installed, or paste output of pip freeze
?
Regardless, I think you're absolutely right - in DataSchema-5.1
we pick up the LC_NUMERIC
(which is set), but in DataSchema-5.0
we attempt to parse LC_ALL
, which is unset. I will push a fix out.
In the meantime, please try running yadg
again after setting LC_ALL
to something like "en_US.UTF-8"
(using export or whatever the command is in zsh
).
Thank you for the quick response,
here is the output of pip freeze
:
annotated-types==0.7.0
appdirs==1.4.4
babel==2.16.0
dgbowl-schemas==117
et-xmlfile==1.1.0
flexcache==0.3
flexparser==0.3.1
h5netcdf==1.3.0
h5py==3.11.0
numpy==2.1.0
olefile==0.47
openpyxl==3.1.5
packaging==24.1
pandas==2.2.2
Pint==0.24.3
pydantic==2.8.2
pydantic_core==2.20.1
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.2
six==1.16.0
striprtf==0.0.26
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
uncertainties==3.2.2
xarray==2024.7.0
xarray-datatree==0.0.14
yadg==5.1
so the version of dgbowl-schemas
is 117
.
Regardless, I think you're absolutely right - in
DataSchema-5.1
we pick up theLC_NUMERIC
(which is set), but inDataSchema-5.0
we attempt to parseLC_ALL
, which is unset. I will push a fix out.In the meantime, please try running
yadg
again after settingLC_ALL
to something like"en_US.UTF-8"
(using export or whatever the command is inzsh
).
this worked after setting LC_ALL to "en_US.UTF-8" I got :
$ yadg
usage: yadg [--version] [--verbose] [--quiet] {process,update,preset,extract} ...
yadg: error: the following arguments are required: subcommand
Which is what I would expect
This should be now fixed, try installing the updated dgbowl-schemas==118
.
Thank you !
Error
steps to reproduce :
output (actual path changed to "localPath" for clarity):
the same error is thrown when importing yadg :
Environment details
os : macOS 14.5 (23F79) python : v3.12.5 or V3.9.19 (in a venv with only yadg installed) shell : zsh 5.9 (x86_64-apple-darwin23.0)
output of
$ locale
yadg version
yadg 5.1 (also tried the development version from GitHub)
Work around/ solution
Using the latest version of
stepdefaults.py
from the github of https://github.com/dgbowl/dgbowl-schemas bypasses the issue by setting a default locale if none is found (https://github.com/dgbowl/dgbowl-schemas/blob/master/src/dgbowl_schemas/yadg/dataschema_5_1/stepdefaults.py)or alternatively hard coding the return value of
locale_set_default()
to your localePS : this was my first time writing an issue. Did I do well ? Any feedback would be appreciated ^^.