From 1498a50737c871a5deb826987b415ee3551191a7 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Fri, 6 Sep 2024 21:17:57 -0600 Subject: [PATCH] Fix Plexon2 in dev tests (#1058) --- .../ecephys/plexon/plexondatainterface.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py b/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py index 4a6a50fa5..fc3dbd3d0 100644 --- a/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py +++ b/src/neuroconv/datainterfaces/ecephys/plexon/plexondatainterface.py @@ -82,7 +82,15 @@ def __init__(self, file_path: FilePath, verbose: bool = True, es_key: str = "Ele Allows verbosity. es_key : str, default: "ElectricalSeries" """ - stream_id = "3" + # TODO: when neo version 0.14.4 is out or higher change this to stream_name for clarify + import neo + from packaging.version import Version + + neo_version = Version(neo.__version__) + if neo_version <= Version("0.13.3"): + stream_id = "3" + else: + stream_id = "WB" assert Path(file_path).is_file(), f"Plexon file not found in: {file_path}" super().__init__( file_path=file_path,