Skip to content

Commit e6c43cb

Browse files
committed
calculate durations only if state data exists
1 parent 517ac2a commit e6c43cb

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"]:
209209
states = d["states"]
210210
timestamps = d["timestamps"]
211211
labels = d["labels"]

0 commit comments

Comments
 (0)