ValueError: unrecognized engine zarr must be one of: ['scipy', 'store']

8.9k Views Asked by At

I am trying to open zarr file as,

import pandas as pd
import xarray as xr
xf = xr.open_zarr("../../data/processed/geolink_norge_dataset/geolink_norge_well_logs.zarr")

But there comes out the errors:


ValueError                                Traceback (most recent call last) <ipython-input-17-ff38d9c54463> in <module>
      1 import pandas as pd
      2 import xarray as xr
----> 3 xf = xr.open_zarr("../../data/processed/geolink_norge_dataset/geolink_norge_well_logs.zarr")
      4 
      5 # We will use just the 30* wells

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\zarr.py in open_zarr(store, group, synchronizer, chunks, decode_cf, mask_and_scale, decode_times, concat_characters, decode_coords, drop_variables, consolidated, overwrite_encoded_chunks, chunk_store, storage_options, decode_timedelta, use_cftime, **kwargs)
    685     }
    686 
--> 687     ds = open_dataset(
    688         filename_or_obj=store,
    689         group=group,

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\api.py in open_dataset(filename_or_obj, engine, chunks, cache, decode_cf, mask_and_scale, decode_times, decode_timedelta, use_cftime, concat_characters, decode_coords, drop_variables, backend_kwargs,
*args, **kwargs)
    480         engine = plugins.guess_engine(filename_or_obj)
    481 
--> 482     backend = plugins.get_backend(engine)
    483 
    484     decoders = _resolve_decoders_kwargs(

C:\ProgramData\Anaconda3\lib\site-packages\xarray\backends\plugins.py in get_backend(engine)
    132         engines = list_engines()
    133         if engine not in engines:
--> 134             raise ValueError(
    135                 f"unrecognized engine {engine} must be one of: {list(engines)}"
    136             )

ValueError: unrecognized engine zarr must be one of: ['scipy','store']

Can anyone help to solve this problem? I can confirm that I have installed the scipy and store packages.

1

There are 1 best solutions below

0
On

You likely need to install the zarr package as well:

pip install zarr

If that doesn't work, try:

pip install xarray[complete]

See https://github.com/pydata/xarray/issues/5395#issuecomment-850483726 for more information.