Skip to content

Commit 062e194

Browse files
committed
Add specific error for non-existent zarr folders
1 parent 1a189e1 commit 062e194

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/spikeinterface/core/zarrextractors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def super_zarr_open(folder_path: str | Path, mode: str = "r", storage_options: d
7474
except Exception as e:
7575
pass
7676
else:
77+
if not Path(folder_path).is_dir():
78+
raise ValueError(f"Folder {folder_path} does not exist")
7779
for open_func in open_funcs:
7880
try:
7981
root = open_func(str(folder_path), mode=mode, storage_options=storage_options)

0 commit comments

Comments
 (0)