From eb37dc6cb9b3da3fef3ce3e882f5690a2ed8dd25 Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 24 Aug 2023 17:06:51 +0100 Subject: [PATCH] Fix bug when running with Kerchunk --- cubed/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cubed/utils.py b/cubed/utils.py index 82156bc8..9ecc7811 100644 --- a/cubed/utils.py +++ b/cubed/utils.py @@ -177,8 +177,7 @@ def extract_array_names(frame): array_names_to_variable_names[arr.name] = var elif ( type(arr).__module__.split(".")[0] == "xarray" - and hasattr(arr, "data") - and hasattr(arr, "name") + and arr.__class__.__name__ == "DataArray" ): if isinstance(arr.data, Array): array_names_to_variable_names[arr.data.name] = arr.name