Open roxyboy opened 6 months ago
Intake >2 is a major rewrite of intake, so you are welcome to pin to an earlier version. However, we still aim for backward compatibility, so if you could please specify in what manner intake is not recognised. Do you have an exception/stack-trace?
Here is an example that works with intake 0.7 but not 2.0. Is it possible there's an issue with the yaml file itself?
Source:
import intake
print(f'intake version: {intake.__version__}')
import intake_xarray
print(f'intake_xarray version: {intake_xarray.__version__}')
cat_url = 'https://raw.githubusercontent.com/pangeo-data/pangeo-datastore/master/intake-catalogs/ocean.yaml'
cat = intake.open_catalog(cat_url)
Output:
intake version: 2.0.3
intake_xarray version: 0.7.0
Traceback (most recent call last):
File "/home/local/KHQ/john.tourtellott/projects/pan3d/git/pan3d/example.py", line 7, in <module>
cat = intake.open_catalog(cat_url)
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/__init__.py", line 184, in open_catalog
return registry[driver](uri, **kwargs)
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/catalog/local.py", line 613, in __init__
super(YAMLFileCatalog, self).__init__(**kwargs)
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/catalog/base.py", line 128, in __init__
self.force_reload()
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/catalog/base.py", line 186, in force_reload
self._load()
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/catalog/local.py", line 648, in _load
self.parse(text)
File "/home/local/KHQ/john.tourtellott/.py3-venv/pan3d/lib/python3.9/site-packages/intake/catalog/local.py", line 728, in parse
raise exceptions.ValidationError(
intake.catalog.exceptions.ValidationError: Catalog 'https://raw.githubusercontent.com/pangeo-data/pangeo-datastore/master/intake-catalogs/ocean.yaml' has validation errors:
("missing 'module'", {'module': 'intake_xarray'})
This should be fixed on intake master, if you wouldn't mind checking
Yes - I confirmed that intake:master can now read that catalog. Many thanks.
So after loading that catalog, I was expecting to find attributes cat.data
, cat.entries
, cat.aliases
, cat.user_parameters
, but they aren't there. I am new to intake so perhaps I misunderstand the user docs?
This is a V1 catalog, and we don't yet have a conversion utility. However the entries are function I think:
list(cat) # names of datasets
cat.sea_surface_height.to_dask() # open one of them
Oh, right. I was applying v2 docs to V1 catalog. Thanks again. I really appreciate your quick response on this.
Hi intake_xarray developers,
I've encountered an error when the version of intake is 2.0.1 where
intake_xarray
doesn't seem to recognizeintake
. When I reverted tointake=0.6.8
, everything seemed to work fine again.