intake / intake-xarray

Intake plugin for xarray
https://intake-xarray.readthedocs.io/
BSD 2-Clause "Simplified" License
74 stars 36 forks source link

Bug: Cannot guess engine with xarray==0.18.0 #103

Closed cwerner closed 2 years ago

cwerner commented 3 years ago

Hi.

With xarray version 0.18 I get an error in my code stating that intake_xarray/ xarray cannot guess the backend. The code works with xarray 0.17.

site-packages/xarray/backends/plugins.py", line 112, in guess_engine
    raise ValueError("cannot guess the engine, try passing one explicitly")

I'm using intake_xarray via intake_thredds.

My relevant code section is:

def get_catalog(url: str) -> intake.Catalog:
    import fsspec

    # specify caching location, where to store files to with their original names
    fsspec.config.conf['simplecache'] = {'cache_storage': '.cache', 'same_names': True}

    catalog = intake.open_thredds_cat(
        f'simplecache::{url}',
        driver="netcdf",
    )
    return catalog
martindurant commented 3 years ago

Sorry for the late reply here. In his case we should always know the xarray engine, right? So the code should be changed to pass it - it won't hurt earlier versions. I think what actually changed is the order in which xarray tries its engines.

aaronspring commented 2 years ago

@cwerner is this still an issue with newer xarray versions?

aaronspring commented 2 years ago

I think that was a problem related to that xarray release.