We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With siphon 0.8.0 and a call with use_xarray=True, I see an ImportError inside siphon:
use_xarray=True
In [56]: import siphon.cdmr.xarray_support --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-56-2438b4811c5c> in <module> ----> 1 import siphon.cdmr.xarray_support ~/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/siphon/cdmr/xarray_support.py in <module> 7 from xarray.backends.common import AbstractDataStore, BackendArray 8 from xarray.core import indexing ----> 9 from xarray.core.utils import FrozenOrderedDict 10 11 from . import Dataset ImportError: cannot import name 'FrozenOrderedDict' from 'xarray.core.utils' (/Users/taugspurger/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/xarray/core/utils.py)
From http://xarray.pydata.org/en/stable/faq.html#what-parts-of-xarray-are-considered-public-api, xarray considers xarray.core to be private, so libraries probably shouldn't be importing from it.
xarray.core
Full example:
In [59]: from siphon.catalog import TDSCatalog ...: In [60]: ds = TDSCatalog("https://geoport.usgs.esipfed.org/thredds/catalog/coawst_4/use/fmrc/catalog.xml").datasets[0].remote_access(use_xarray=True) --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-60-8d35c9e831d1> in <module> ----> 1 ds = TDSCatalog("https://geoport.usgs.esipfed.org/thredds/catalog/coawst_4/use/fmrc/catalog.xml").datasets[0].remote_access(use_xarray=True) ~/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/siphon/catalog.py in remote_access(self, service, use_xarray) 620 raise ValueError(service + ' is not a valid service for remote_access') 621 --> 622 return self.access_with_service(service, use_xarray) 623 624 def subset(self, service=None): ~/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/siphon/catalog.py in access_with_service(self, service, use_xarray) 672 if service == 'CdmRemote': 673 if use_xarray: --> 674 from .cdmr.xarray_support import CDMRemoteStore 675 try: 676 import xarray as xr ~/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/siphon/cdmr/xarray_support.py in <module> 7 from xarray.backends.common import AbstractDataStore, BackendArray 8 from xarray.core import indexing ----> 9 from xarray.core.utils import FrozenOrderedDict 10 11 from . import Dataset ImportError: cannot import name 'FrozenOrderedDict' from 'xarray.core.utils' (/Users/taugspurger/miniconda3/envs/pangeo-forge-37/lib/python3.7/site-packages/xarray/core/utils.py)
The text was updated successfully, but these errors were encountered:
Ugh, thanks for reporting. Definitely need to address and get a 0.9 out the door.
Sorry, something went wrong.
Maybe something similar to what psyplot is doing could work ? https://psyplot.readthedocs.io/en/latest/_modules/psyplot/gdal_store.html
try: from xarray.core.utils import FrozenOrderedDict except ImportError: FrozenOrderedDict = dict
It's actually likely we do like MetPy, and bump our minimum supported xarray version and change the code to:
from xarray.core.utils import FrozenDict
Looks like this was actually already done in #291 , but just not released yet.
No branches or pull requests
With siphon 0.8.0 and a call with
use_xarray=True
, I see an ImportError inside siphon:From http://xarray.pydata.org/en/stable/faq.html#what-parts-of-xarray-are-considered-public-api, xarray considers
xarray.core
to be private, so libraries probably shouldn't be importing from it.Full example:
The text was updated successfully, but these errors were encountered: