You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error message
File ~/.pyenv/versions/py312numpy1/lib/python3.12/site-packages/xarray/backends/api.py:1292, in to_netcdf(dataset, path_or_file, mode, format, group, engine, encoding, unlimited_dims, compute, multifile, invalid_netcdf)
1290 # validate Dataset keys, DataArray names, and attr keys/values
1291 _validate_dataset_names(dataset)
...
197 "netCDF files, its value must be of one of the following types: "
198 f"{', '.join([vtype.name for vtype in valid_types])}"
199 )
TypeError: Invalid value for attr 'Fetched_constraints': WMO5903377. For serialization to netCDF files, its value must be of one of the following types: str, Number, ndarray, number, list, tuple
Reproducible code:
Error message
File ~/.pyenv/versions/py312numpy1/lib/python3.12/site-packages/xarray/backends/api.py:1292, in to_netcdf(dataset, path_or_file, mode, format, group, engine, encoding, unlimited_dims, compute, multifile, invalid_netcdf)
1290 # validate Dataset keys, DataArray names, and attr keys/values
1291 _validate_dataset_names(dataset)
...
197 "netCDF files, its value must be of one of the following types: "
198 f"{', '.join([vtype.name for vtype in valid_types])}"
199 )
TypeError: Invalid value for attr 'Fetched_constraints': WMO5903377. For serialization to netCDF files, its value must be of one of the following types: str, Number, ndarray, number, list, tuple
Debugging:
Fetched_constraints: <class 'argopy.utils.format.UriCName'>
Converting Fetched_constraints to string
and then save done
Problem Description
I think it come from
#400
Versions
Output of `argopy.show_versions()`
SYSTEM
commit: None
python: 3.12.5 (main, Sep 2 2024, 14:21:15) [GCC 13.2.0]
python-bits: 64
OS: Linux
OS-release: 6.8.0-45-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: zh_TW.UTF-8
LOCALE: zh_TW.UTF-8
libhdf5: 1.14.2
libnetcdf: 4.9.3-development
INSTALLED VERSIONS: CORE
aiohttp : 3.10.5
argopy : 1.0.0
decorator : 5.1.1
erddapy : 2.2.0
fsspec : 2023.10.0
netCDF4 : 1.7.1.post2
...
INSTALLED VERSIONS: PIP
The text was updated successfully, but these errors were encountered: