Repository navigation
Description
Describe the bug
neo.TdtIO fails to instantiate when loading a TDT tank directory. The tank directory consists of non-empty files,
-r-xr-xr-x 1 user user 124 Jan 8 2024 desktop.ini
-r-xr-xr-x 1 user user 296943 Jan 8 2024 recording_name.Tbk
-r-xr-xr-x 1 user user 543056 Jan 8 2024 recording_name.Tdx
-r-xr-xr-x 1 user user 2486350776 Jan 8 2024 recording_name.tev
-r-xr-xr-x 1 user user 4971450 Jan 8 2024 recording_name.tin
-r-xr-xr-x 1 user user 23 Jan 8 2024 recording_name.tnt
-r-xr-xr-x 1 user user 61415680 Jan 8 2024 recording_name.tsq
-r-xr-xr-x 1 user user 23096 Jan 8 2024 Notes.txt
-r-xr-xr-x 1 user user 2152 Jan 8 2024 StoresListing.txt
This data is clearly intact because it can be loaded via TDT's own Python package, tdt.
To Reproduce
A Python REPL session can be used to reproduce the issue,
Python 3.14.10 (main, Oct 26 2026, 15:29:55) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib , neo
>>> tankname = pathlib.Path( '/home/<redacted path to tank>' )
>>> d = neo.TdtIO( tankname )
/home/display/Neuro/spksort/lib/python3.14/site-packages/neo/rawio/tdtrawio.py:119: UserWarning: Could not find any data set belonging to /home/<redacted path to tank>
warnings.warn(f"Could not find any data set belonging to {self.dirname}")
Traceback (most recent call last):
File "<python-input-4>", line 1, in <module>
d = neo.TdtIO( tankname )
File "/home/display/Neuro/spksort/lib/python3.14/site-packages/neo/io/tdtio.py", line 20, in __init__
BaseFromRaw.__init__(self, dirname)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/home/display/Neuro/spksort/lib/python3.14/site-packages/neo/io/basefromrawio.py", line 77, in __init__
self.parse_header()
~~~~~~~~~~~~~~~~~^^
File "/home/display/Neuro/spksort/lib/python3.14/site-packages/neo/rawio/baserawio.py", line 211, in parse_header
self._parse_header()
~~~~~~~~~~~~~~~~~~^^
File "/home/display/Neuro/spksort/lib/python3.14/site-packages/neo/rawio/tdtrawio.py", line 193, in _parse_header
self._global_t_start = self._seg_t_starts[0]
~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
Expected behaviour
The TdtIO object should be created and allow access to the data from the TDT tank directory.
Environment:
- System : Ubuntu 24.04.5 LTS Linux display-Latitude-5440 7.0.0-43-generic no.43~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 31 06:52:47 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
- Python : 3.14.10
- neo : 0.14.6
- numpy : 2.5.4
- tdt : 0.7.6
- spikeinterface : 0.105.4
Additional context
A clean Python virtual environment was used for testing. neo was installed automatically by pip during the process of installing spikeinterface.
$ python3.14 -m venv spksort
$ source spksort/bin/activate
(spksort) $ pip install spikeinterface
The present issue is not related to importing data from .sev files (there were none) nor does it have to do with detecting separate sessions. Therefore, the existing TDT issues (at the time of writing) do not apply,
Activity