Closed keewis closed 3 years ago
Looking into ecmwf/cfgrib#226 that seems related.
it is interesting that this only happens for py37 macos
, py37 ubuntu
and py39 ubuntu
but nothing else.
Looking into ecmwf/cfgrib#226 that seems related.
That does indeed seem related but seems to use py38
which does not fail for us.
For reference, this is the traceback:
Thanks @keewis! ATM the main suspect is a flaky the dependency between python-eccodes
and eccodes
, not cfgrib
itself. So it may look like a random error in CI.
As a general measure I would add ImportError
to the exception caught on import so we avoid to crash xarray:
To work around the current problem we may need to add a eccodes>=2.21.0
to the CI :/
To work around the current problem we may need to add a
eccodes>=2.21.0
to the CI
agreed. If eccodes<2.21.0
is truly incompatible with the new version of cfgrib
, you could also release a new build on conda-forge
.
Technically this is an incompatibility between python-eccodes
and eccodes
, I'm trying to resolve it via a PR to the python-eccodes-feedstock
: https://github.com/conda-forge/python-eccodes-feedstock/pull/71
@keewis after merging #5139 the CI should not be failing anymore. The problem is now that cfgrib may not be consistently tested on all jobs and failures are silent.
I'll wait a bit for the fix in python-eccodes
, otherwise I'll do a new release of the conda package of cfgrib.
great. If this is nothing we have control over, should we close this?
Yes, I would close the issue.
thanks, @alexamici
@alexamici, I'm not sure why but mamba
does not install the fixed build of python-eccodes
on py39:
/home/runner/work/xarray/xarray/xarray/backends/cfgrib_.py:27: UserWarning: Failed to load cfgrib - most likely there is a problem accessing the ecCodes library. Try `import cfgrib` to get the full error message
Do you have any idea how to fix that?
I don't know, I've never managed to get cfgrib and xarray to install on python 3.9. The conda solver fails.
It looks like there is a conflict between xarray and eccodes dependencies, but I didn't investigate.
both
mamba create -n py39-mamba python=3.9 mamba
mamba env update -n py39-mamba -f ci/requirements/environment.yml
and
conda create -n py39-conda python=3.9
conda env update -n py39-conda -f ci/requirements/environment.yml
work for me (on linux), but mamba
installs the wrong version of python-eccodes
(build number 0
instead of number 1
). Of course, there's lots of other differences (mostly different build hashes).
Edit: not sure if I didn't do anything wrong, though
It seems
cfgrib
(or one of its dependencies) is breaking the import ofxarray
on both upsteam-dev and some of the normal CI. Interestingly, the broken environments installedeccodes=2.19.1
while the ones which are passing haveeccodes=2.21.0
.Is this a
mamba
/conda
caching issue?cc @andersy005 @alexamici