-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
This change in 0.8.1 seems problematic.
If the returned list has more than one item, it will raise a ValueError:
File /opt/conda/envs/birdy/lib/python3.9/site-packages/cf_xarray/accessor.py:2276, in CFDatasetAccessor.get_bounds_dim_name(self, key)
2263 def get_bounds_dim_name(self, key: Hashable) -> Hashable:
2264 """
2265 Get bounds dim name for variable corresponding to key.
2266
(...)
2274 str
2275 """
-> 2276 (crd_name,) = apply_mapper(_get_all, self._obj, key, error=False, default=[key])
2277 variables = self._obj._variables
2278 crd = variables[crd_name]
ValueError: too many values to unpack (expected 1) In my particular case, the returned value is ['lon_bounds', 'lon'].
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed