From e8eaf9584477771fa960dd4b1047e48f8ed8ebfd Mon Sep 17 00:00:00 2001 From: Luigi Petrucco Date: Mon, 18 Nov 2024 14:30:07 +0100 Subject: [PATCH] version check fix --- src/probeinterface/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/probeinterface/io.py b/src/probeinterface/io.py index 91d6d55..d175157 100644 --- a/src/probeinterface/io.py +++ b/src/probeinterface/io.py @@ -1700,9 +1700,9 @@ def read_openephys( raise Exception("NP_PROBE field not found in settings") return None - # In neuropixel plugin 0.7, the option for enabling/disabling probes was added. + # In neuropixel plugin 0.7.0, the option for enabling/disabling probes was added. # Make sure we only keep enabled probes. - if editor.find("NP_PROBE") and "isEnabled" in editor.find("NP_PROBE").attrib.keys(): + if neuropix_pxi_version >= parse("0.7.0") and neuropix_pxi_version < parse("1.0.0dev0"): np_probes = [probe for probe in editor.findall("NP_PROBE") if probe.attrib["isEnabled"] == "1"] if len(np_probes) == 0: if raise_error: