google / Xee

An Xarray extension for Google Earth Engine
Apache License 2.0
240 stars 28 forks source link

ValueError: unrecognized engine ee must be one of: ['scipy', 'rasterio', 'store'] #116

Closed chrowe closed 9 months ago

chrowe commented 9 months ago

I am running

To reproduce

import ee
import xarray

ee.Initialize(opt_url='https://earthengine-highvolume.googleapis.com')
ds = xarray.open_dataset('ee://ECMWF/ERA5_LAND/HOURLY', engine='ee')

Error

partially initialized module 'xee' has no attribute 'EarthEngineBackendEntrypoint' (most likely due to a circular import)
  warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
/opt/homebrew/Caskroom/miniconda/base/envs/cities-cif/lib/python3.10/site-packages/xarray/backends/plugins.py:80: RuntimeWarning: Engine 'ee' loading failed:
unrecognized engine ee must be one of: ['scipy', 'rasterio', 'store']
  warnings.warn(f"Engine {name!r} loading failed:\n{ex}", RuntimeWarning)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/Caskroom/miniconda/base/envs/cities-cif/lib/python3.10/site-packages/xarray/backends/api.py", line 558, in open_dataset
    backend = plugins.get_backend(engine)
  File "/opt/homebrew/Caskroom/miniconda/base/envs/cities-cif/lib/python3.10/site-packages/xarray/backends/plugins.py", line 205, in get_backend
    raise ValueError(
ValueError: unrecognized engine ee must be one of: ['scipy', 'rasterio', 'store']
chrowe commented 9 months ago

Ok, silly mistake here. I had a file called xee.py in the project folder. Changing the name of that resolved this.