Closed mphemming closed 1 year ago
Thanks @mphemming . Good to know you have solved the issue. It seems strange that xarray would fail to automatically pick the right engine, unless your input file had something unusual about it?
Package versions can definitely make a big difference. I've also found that with pandas
and xarray
, being quite actively developed. There can be significant changes in functionality between versions.
FYI, on our production servers we are still running this code under Python 3.5 (no longer supported!), with the following package versions:
netCDF4 1.5.3
pandas 0.24.2
xarray 0.11.3
Very soon we'll upgrade all that to python 3.8 with
netCDF4==1.5.8
pandas==1.3.5
xarray==2022.3.0
Closing as it has been resolved. @mphemming feel free to reopen if this happens again
I was getting an error on line 227 similar to the below:
I made the following changes on line 227:
with xr.open_dataset(os.path.join(input_dir, file)) as nc:
towith xr.open_dataset(os.path.join(input_dir, file), engine='netcdf4') as nc:
The script worked after this change.
However, today I deleted this extra code and ran again to test if I can replicate the error and I no longer receive it. It might have been that my version of xarray needed updating, and I have since done that.