Skip to content

Commit 0abf639

Browse files
authored
Merge pull request #3686 from alejoe91/fix-super-zarr-open
Fix bug in `super_zarr_open`
2 parents 88d1c55 + f9b4f7b commit 0abf639

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/spikeinterface/core/zarrextractors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def super_zarr_open(folder_path: str | Path, mode: str = "r", storage_options: d
6262
else:
6363
storage_options_to_test = (storage_options,)
6464

65+
root = None
6566
if is_path_remote(str(folder_path)):
66-
root = None
6767
for open_func in open_funcs:
6868
if root is not None:
6969
break
@@ -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)