Closed
Description
What happened?
I'm getting the error while trying to display a dataset opened through xarray.open_mfdataset() with a defined chunk in a jupyter notebook.
I can reproduce the error using this sample file from Unidata using the following packages (version).
- dask 2025.5.1
- h5netcdf 1.6.1
- h5py 3.13.0
- ipykernel 6.29.5
- ipython 9.3.0
- ipython_pygments_lexers 1.1.1
- jedi 0.19.2
- jupyter_client 8.6.3
- jupyter_core 5.8.1
- netCDF4 1.7.2
- scipy 1.15.3
- xarray 2025.4.0
I'm using other basic packages but i think these are the main packages to help in bug tracking.
The error that is displayed is the following:
What did you expect to happen?
Display the dataset with the 'chunk scheme'.
Minimal Complete Verifiable Example
import xarray as xr
from glob import glob
arqs = list(glob('../sre*'))
ds = xr.open_mfdataset([arqs[0]], engine='scipy', chunks={'lat':50, 'lon':50}
MVCE confirmation
- Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- Complete example — the example is self-contained, including all data and the text of any traceback.
- Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
- New issue — a search of GitHub Issues suggests this is not a duplicate.
- Recent environment — the issue occurs with the latest version of xarray and its dependencies.
Relevant log output
Anything else we need to know?
No response