python-neo icon indicating copy to clipboard operation
python-neo copied to clipboard

Error opening OpenEphys files with no events

Open mkollo opened this issue 3 years ago • 1 comments

Describe the bug Since 11.1.0, due to the change in openephysbinaryrawio.py, neo/rawio/openephysbinaryrawio.py", line 215, OpenEphys files without events cannot be opened:

File "site-packages/neo/rawio/baserawio.py", line 179, in parse_header self._parse_header() File "site-packages/neo/rawio/openephysbinaryrawio.py", line 215, in _parse_header if states[0] < 0: File "site-packages/numpy/core/memmap.py", line 334, in getitem res = super().getitem(index) IndexError: index 0 is out of bounds for axis 0 with size 0

this: if states[0] < 0: in 11.0 used to be : elif 'states' in d:

mkollo avatar Oct 25 '22 09:10 mkollo

@mkollo Thank for testing the new release! Can you confirm #1189 fixes the issue?

JuliaSprenger avatar Oct 25 '22 09:10 JuliaSprenger

@mkollo Did you have time to check if https://github.com/NeuralEnsemble/python-neo/pull/1189 fixes the issue for you?

JuliaSprenger avatar Nov 03 '22 15:11 JuliaSprenger

Hi, Sorry for the delay. Yes, I tested it now, and it does fix it, thank you!

mkollo avatar Nov 03 '22 16:11 mkollo

Thanks!

JuliaSprenger avatar Nov 03 '22 16:11 JuliaSprenger