From 3a13efe7607404a36337baa083b8dbe283a45bf0 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 13 Sep 2024 12:59:42 +0200 Subject: [PATCH] Check run info completed only if it exists (back-compatibility) --- src/spikeinterface/core/sortinganalyzer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/spikeinterface/core/sortinganalyzer.py b/src/spikeinterface/core/sortinganalyzer.py index 3aa582da68..8980fb5559 100644 --- a/src/spikeinterface/core/sortinganalyzer.py +++ b/src/spikeinterface/core/sortinganalyzer.py @@ -2240,9 +2240,10 @@ def get_pipeline_nodes(self): return self._get_pipeline_nodes() def get_data(self, *args, **kwargs): - assert self.run_info[ - "run_completed" - ], f"You must run the extension {self.extension_name} before retrieving data" + if self.run_info is not None: + assert self.run_info[ + "run_completed" + ], f"You must run the extension {self.extension_name} before retrieving data" assert len(self.data) > 0, "Extension has been run but no data found." return self._get_data(*args, **kwargs)