Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NetCDFSource' object has no attribute 'pattern' #142

Open
wachsylon opened this issue Mar 1, 2024 · 2 comments
Open

AttributeError: 'NetCDFSource' object has no attribute 'pattern' #142

wachsylon opened this issue Mar 1, 2024 · 2 comments

Comments

@wachsylon
Copy link

I think self.pattern needs to be changed into self.path_as_pattern:

if self.pattern:

I run into the issue with a simple

sources:
  2D_const_0.25deg:
    description: 2D constant variables from IFS-AMIP
    driver: netcdf
    args:
      urlpath: "/work/bk1377/b382473/IFS_AMIP/prepIFS/OSTIA/gribscan/2D_const_0.25deg/*.grib"
      xarray_kwargs:
        engine: cfgrib

catalog.

@garciampred
Copy link

garciampred commented Apr 19, 2024

I think this pattern property used to be defined in the PatternMixin (https://github.com/intake/intake/blob/12ce9abc1611b8612b4a741fc1e0f106058ebbaa/intake/source/base.py), but this mixin seems to be empty in the last versions.

@martindurant
Copy link
Member

Correct, Intake 2 readers are by design much simpler than the previous iteration, to encourage the creation of many many readers. In so doing, some complex functionality has been lost. Of course, there's nothing to stop you using intake<2, and the same effect can still be achieved in V2 too (see e.g., DaskCSVPattern for csvs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants