Skip to content

Commit

Permalink
Merge branch 'main' into patch_scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
yger authored Oct 4, 2023
2 parents 2a5e37c + af9660a commit 92b41f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/spikeinterface/core/waveform_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ def load_from_folder(
rec_attributes = None

if sorting is None:
sorting = load_extractor(folder / "sorting.json", base_folder=folder)
if (folder / "sorting.json").exists():
sorting = load_extractor(folder / "sorting.json", base_folder=folder)
elif (folder / "sorting.pickle").exists():
sorting = load_extractor(folder / "sorting.pickle")
else:
raise FileNotFoundError("load_waveforms() impossible to find the sorting object (json or pickle)")

# the sparsity is the sparsity of the saved/cached waveforms arrays
sparsity_file = folder / "sparsity.json"
Expand Down

0 comments on commit 92b41f7

Please sign in to comment.