Skip to content

Commit 7af346a

Browse files
authored
Merge pull request #1189 from JuliaSprenger/fix/1188
[openephys] calculate durations only if state data exists
2 parents 7fc30cb + a3a86dc commit 7af346a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

neo/rawio/openephysbinaryrawio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _parse_header(self):
205205
raise ValueError(f'There is no possible labels for this event: {stream_name}')
206206

207207
# # If available, use 'states' to compute event duration
208-
if 'states' in d:
208+
if 'states' in d and d["states"].size:
209209
states = d["states"]
210210
timestamps = d["timestamps"]
211211
labels = d["labels"]

0 commit comments

Comments
 (0)