-
Notifications
You must be signed in to change notification settings - Fork 45
Labels
KerchunkRelating to the kerchunk library / specification itselfRelating to the kerchunk library / specification itselfbugSomething isn't workingSomething isn't workingparsers
Milestone
Description
open_virtual_dataset
says it supports TIFF files however it currently fails and is lacking test coverage. The issue starts here where the kerchunk reference to a zarr array is treated as an HDF reference that has one or more groups.
Code to reproduce
from pathlib import Path
import numpy as np
from PIL import Image
from virtualizarr import open_virtual_dataset
from virtualizarr.backend import FileType
def write_random_tiff(file_path):
array = np.random.randint(0, 255, (128, 128), dtype=np.uint8)
img = Image.fromarray(array)
img.save(file_path)
file_path = Path.cwd() / "test.tif"
write_random_tiff(file_path)
open_virtual_dataset(str(file_path), filetype=FileType.tiff)
Throws:
File virtualizarr/translators/kerchunk.py:46, in extract_group(vds_refs, group)
ValueError: Multiple HDF Groups found. Must specify group= keyword to select one of []
virtualizarr = 1.1.0
TomNicholas, norlandrhagen and fabito
Metadata
Metadata
Assignees
Labels
KerchunkRelating to the kerchunk library / specification itselfRelating to the kerchunk library / specification itselfbugSomething isn't workingSomething isn't workingparsers