xcube-dev / xcube

xcube is a Python package for generating and exploiting data cubes powered by xarray, dask, and zarr.
https://xcube.readthedocs.io/
MIT License
201 stars 20 forks source link

test_normalize_zonal_lat_lon failing with xarray 2023.09.0 #897

Closed pont-us closed 8 months ago

pont-us commented 1 year ago

Describe the bug When running the xcube unit test test.core.test_normalize.TestNormalize.test_normalize_zonal_lat_lon in an environment with xarray 2023.09.0, the following error occurs:

E               ValueError: cannot re-index or align objects with conflicting indexes found for the following dimensions: 'lat' (2 conflicting indexes)
E               Conflicting indexes may occur when
E               - they relate to different sets of coordinate and/or dimension names
E               - they don't have the same type
E               - they may be used to reindex data along common dimensions

To Reproduce Steps to reproduce the behavior:

  1. Ensure that your environment has xarray 2023.09.0 installed
  2. Run the unit test test_normalize_zonal_lat_lon
  3. See error

Expected behavior The test passes.

Additional context The error is raised at xarray.core.alignment:312, in the assert_no_index_conflict function. git blame says that this function hasn't changed since 2022, so evidently the cause is elsewhere.

Pinning the xarray version to <2023.09.0 would be a reasonable temporary workaround.

pont-us commented 1 year ago

backtrace.txt