Skip to content

Commit

Permalink
Merge pull request #2067 from samuelgarcia/various_fix
Browse files Browse the repository at this point in the history
waveform extactor reload
  • Loading branch information
samuelgarcia authored Oct 4, 2023
2 parents ca48f6b + 0c97fc4 commit af9660a
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 af9660a

Please sign in to comment.