From 2ea3957338caf35aef02bd79f6358325c2c773d2 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Wed, 15 Jan 2025 15:54:02 +0100 Subject: [PATCH] Catching errors --- src/spikeinterface/sortingcomponents/clustering/split.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/spikeinterface/sortingcomponents/clustering/split.py b/src/spikeinterface/sortingcomponents/clustering/split.py index 7ae4ac266f..d6379ba180 100644 --- a/src/spikeinterface/sortingcomponents/clustering/split.py +++ b/src/spikeinterface/sortingcomponents/clustering/split.py @@ -84,10 +84,10 @@ def split_clusters( current_max_label = np.max(labels_set) + 1 jobs = [] - if debug_folder.exists(): - import shutil - - shutil.rmtree(debug_folder) + if debug_folder is not None: + if debug_folder.exists(): + import shutil + shutil.rmtree(debug_folder) for label in labels_set: peak_indices = np.flatnonzero(peak_labels == label)