diff --git a/kerchunk/hdf.py b/kerchunk/hdf.py index f7115fca..46c325c8 100644 --- a/kerchunk/hdf.py +++ b/kerchunk/hdf.py @@ -458,7 +458,11 @@ def _translator(self, name: str, h5obj: Union[h5py.Dataset, h5py.Group]): if h5obj.fletcher32: logging.info("Discarding fletcher32 checksum") v["size"] -= 4 - if self.inline and isinstance(v, list) and v[2] < self.inline: + if ( + self.inline + and isinstance(v, dict) + and v["size"] < self.inline + ): self.input_file.seek(v["offset"]) data = self.input_file.read(v["size"]) try: @@ -466,7 +470,7 @@ def _translator(self, name: str, h5obj: Union[h5py.Dataset, h5py.Group]): data.decode("ascii") except UnicodeDecodeError: data = b"base64:" + base64.b64encode(data) - self.store[k] = data + self.store[za._chunk_key(k)] = data else: self.store[za._chunk_key(k)] = [ self._uri,