issues: 869948050
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
869948050 | MDU6SXNzdWU4Njk5NDgwNTA= | 5230 | Same files in open_mfdataset() unclear error message | 57914115 | closed | 0 | 3 | 2021-04-28T13:26:59Z | 2021-04-30T12:41:17Z | 2021-04-30T12:41:17Z | CONTRIBUTOR | When using xr.open_mfdataset() with two exact same files by mistake, it causes an unclear error message What happened: With of course the
```pythonValueError Traceback (most recent call last) ~/.local/src/miniconda/envs/minireobs/lib/python3.8/site-packages/xarray/backends/api.py in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, lock, data_vars, coords, combine, parallel, join, attrs_file, **kwargs) 966 # Redo ordering from coordinates, ignoring how they were ordered 967 # previously --> 968 combined = combine_by_coords( 969 datasets, 970 compat=compat, ~/.local/src/miniconda/envs/minireobs/lib/python3.8/site-packages/xarray/core/combine.py in combine_by_coords(datasets, compat, data_vars, coords, fill_value, join, combine_attrs) 762 concatenated_grouped_by_data_vars = [] 763 for vars, datasets_with_same_vars in grouped_by_vars: --> 764 combined_ids, concat_dims = _infer_concat_order_from_coords( 765 list(datasets_with_same_vars) 766 ) ~/.local/src/miniconda/envs/minireobs/lib/python3.8/site-packages/xarray/core/combine.py in _infer_concat_order_from_coords(datasets) 106 107 if len(datasets) > 1 and not concat_dims: --> 108 raise ValueError( 109 "Could not find any dimension coordinates to use to " 110 "order the datasets for concatenation" ValueError: Could not find any dimension coordinates to use to order the datasets for concatenation ``` What you expected to happen: A warning saying that we are using the same dataset ? A more explicit error message (exact same dimensions) ? No error and no concatenation, remove duplicated datasets? Environment: Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 5.4.0-72-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: fr_FR.UTF-8 LOCALE: fr_FR.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.7.3 xarray: 0.17.0 pandas: 1.1.1 numpy: 1.19.2 scipy: 1.5.2 netCDF4: 1.5.3 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.2.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2021.04.0 distributed: 2021.04.0 matplotlib: 3.3.1 cartopy: None seaborn: None numbagg: None pint: None setuptools: 49.6.0.post20200814 pip: 20.2.2 conda: None pytest: 6.1.1 IPython: 7.18.1 sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/5230/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |