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
Many notebooks out there start with the line ds = xr.tutorial.load_dataset("air_temperature"). That now gives an error traceback with xarray>=0.18:
Traceback (most recent call last):
File "/Users/scott/GitHub/zarrdata/./create_zarr.py", line 6, in <module>
ds = xr.tutorial.load_dataset("air_temperature")
File "/Users/scott/miniconda3/envs/zarrdata/lib/python3.9/site-packages/xarray/tutorial.py", line 179, in load_datasetwith open_dataset(*args, **kwargs) as ds:
File "/Users/scott/miniconda3/envs/zarrdata/lib/python3.9/site-packages/xarray/tutorial.py", line 100, in open_dataset
ds = _open_dataset(filepath, **kws)
File "/Users/scott/miniconda3/envs/zarrdata/lib/python3.9/site-packages/xarray/backends/api.py", line 485, in open_dataset
engine = plugins.guess_engine(filename_or_obj)
File "/Users/scott/miniconda3/envs/zarrdata/lib/python3.9/site-packages/xarray/backends/plugins.py", line 112, in guess_engineraiseValueError("cannot guess the engine, try passing one explicitly")
ValueError: cannot guess the engine, try passing one explicitly
It's an easy fix though, just add ds = xr.tutorial.load_dataset("air_temperature", engine="netcdf4"), new users might be thrown by that though. Also a note that unless the netcdf4 library is explicitly put into the software environment, even adding the engine=netcdf4 can result in an error: "ValueError: unrecognized engine netcdf4 must be one of: ['store', 'zarr']", so I think a minimal environment definition to run would be:
thanks for the report, @scottyhq. Please note that while the module is called xarray.tutorial (the same as this repository), it is actually implemented in the main repository. I'll close this and re-open on the main repository. Feel free to continue there.
Many notebooks out there start with the line
ds = xr.tutorial.load_dataset("air_temperature")
. That now gives an error traceback with xarray>=0.18:It's an easy fix though, just add
ds = xr.tutorial.load_dataset("air_temperature", engine="netcdf4")
, new users might be thrown by that though. Also a note that unless thenetcdf4
library is explicitly put into the software environment, even adding the engine=netcdf4 can result in an error: "ValueError: unrecognized engine netcdf4 must be one of: ['store', 'zarr']", so I think a minimal environment definition to run would be:The text was updated successfully, but these errors were encountered: