Skip to content

Commit

Permalink
Merge pull request #3482 from zm711/basesorter
Browse files Browse the repository at this point in the history
Remove Non-Serializable writing of json
  • Loading branch information
alejoe91 authored Nov 4, 2024
2 parents 0baf7e0 + af1709a commit 1295c7e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spikeinterface/sorters/basesorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ def initialize_folder(cls, recording, output_folder, verbose, remove_existing_fo
elif recording.check_serializability("pickle"):
recording.dump(output_folder / "spikeinterface_recording.pickle", relative_to=output_folder)
else:
# TODO: deprecate and finally remove this after 0.100
d = {"warning": "The recording is not serializable to json"}
rec_file.write_text(json.dumps(d, indent=4), encoding="utf8")
raise RuntimeError(
"This recording is not serializable and so can not be sorted. Consider `recording.save()` to save a "
"compatible binary file."
)

return output_folder

Expand Down

0 comments on commit 1295c7e

Please sign in to comment.