hydroclimali / XEE_tutorial

55 stars 8 forks source link

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

Closed zandratay closed 7 months ago

zandratay commented 7 months ago

Hello, I am running the following cell when the error occurred. Even after doing pip install xarray[complete], the error still occurred.

ic = ee.ImageCollection('ECMWF/ERA5_LAND/DAILY_AGGR').filterDate(
    '2000-01-01', '2023-12-31').select('temperature_2m')
# Another way to do the selection is to not select any band in ic,
# and then use xarray to select the desired variable.
region = ee.Geometry.Rectangle(-130, 25, -60, 50)
ds = xr.open_dataset(ic,
                     engine='ee',
                     crs='EPSG:4326',
                     scale=0.2,
                     geometry=region)

The error that occurred involved the engine 'ee' not existing

hydroclimali commented 7 months ago

I guess that should do something with the EE installation (better to share the exact error to know better what it may be). Were you able to initialize ee in the cell before? And is the error happening in the line for "ic = ..." or "ds =..."?

zandratay commented 7 months ago

Yes, i was able to initialise EE. The error is occurring in the line "ds = ...". Here is the full error:

ValueError                                Traceback (most recent call last)
[<ipython-input-6-32de909accdd>](https://localhost:8080/#) in <cell line: 8>()
      6 # and then use xarray to select the desired variable.
      7 region = ee.Geometry.Rectangle(-130, 25, -60, 50)
----> 8 ds = xr.open_dataset(ic,
      9                      engine='ee',
     10                      crs='EPSG:4326',

1 frames
[/usr/local/lib/python3.10/dist-packages/xarray/backends/plugins.py](https://localhost:8080/#) in get_backend(engine)
    203         engines = list_engines()
    204         if engine not in engines:
--> 205             raise ValueError(
    206                 f"unrecognized engine {engine} must be one of: {list(engines)}"
    207             )
hydroclimali commented 7 months ago

Have you installed xee (https://github.com/google/Xee)? If not, please do so (pip install --upgrade xee). If yes, I'm not sure what's causing the issue :|

zandratay commented 7 months ago

It works now! Thank you and apologies for the blunder, I may have missed that out in the tutorial

hydroclimali commented 7 months ago

Great! Glad to hear that the issue is resolved.