diff --git a/pyproject.toml b/pyproject.toml index 8fc4c449f7..cb71bb499b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,9 +23,10 @@ dependencies = [ "numpy", "threadpoolctl>=3.0.0", "tqdm", - "zarr>=0.2.16", + "zarr>=2.16,<2.18", "neo>=0.13.0", "probeinterface>=0.2.21", + "packaging", ] [build-system] diff --git a/src/spikeinterface/extractors/neoextractors/spikegadgets.py b/src/spikeinterface/extractors/neoextractors/spikegadgets.py index e835edf961..7d6b492325 100644 --- a/src/spikeinterface/extractors/neoextractors/spikegadgets.py +++ b/src/spikeinterface/extractors/neoextractors/spikegadgets.py @@ -1,9 +1,10 @@ from __future__ import annotations - from pathlib import Path -import probeinterface +import packaging +import packaging.version +import probeinterface from spikeinterface.core.core_tools import define_function_from_class from .neobaseextractor import NeoBaseRecordingExtractor @@ -38,7 +39,9 @@ def __init__(self, file_path, stream_id=None, stream_name=None, block_index=None ) self._kwargs.update(dict(file_path=str(Path(file_path).absolute()), stream_id=stream_id)) - probegroup = probeinterface.read_spikegadgets(file_path, raise_error=False) + probegroup = None # TODO remove once probeinterface is updated to 0.2.22 in the pyproject.toml + if packaging.version.parse(probeinterface.__version__) > packaging.version.parse("0.2.21"): + probegroup = probeinterface.read_spikegadgets(file_path, raise_error=False) if probegroup is not None: self.set_probes(probegroup, in_place=True)