diff --git a/src/cellmap_data/image.py b/src/cellmap_data/image.py index 07bab4b..48a7048 100644 --- a/src/cellmap_data/image.py +++ b/src/cellmap_data/image.py @@ -783,6 +783,10 @@ def array(self) -> xarray.DataArray: try: array = array_future.result() except ValueError as e: + if "ALREADY_EXISTS" in str(e): + raise FileExistsError( + f"Image already exists at {self.path}. Set overwrite=True to overwrite the image." + ) Warning(e) UserWarning("Falling back to zarr3 driver") spec["driver"] = "zarr3"