File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,10 @@ def _parse_header(self):
107107 stream_bytes = {}
108108 for device in hconf :
109109 stream_id = device .attrib ["name" ]
110- num_bytes = int (device .attrib ["numBytes" ])
111- stream_bytes [stream_id ] = packet_size
112- packet_size += num_bytes
110+ if 'numBytes' in device .attrib .keys ():
111+ num_bytes = int (device .attrib ["numBytes" ])
112+ stream_bytes [stream_id ] = packet_size
113+ packet_size += num_bytes
113114
114115 # timestamps 4 uint32
115116 self ._timestamp_byte = packet_size
@@ -139,7 +140,7 @@ def _parse_header(self):
139140 # TODO LATER: deal with "headstageSensor" which have interleaved
140141 continue
141142
142- if channel .attrib ["dataType" ] == "analog" :
143+ if ( 'dataType' in channel .attrib . keys ()) and ( channel . attrib ["dataType" ] == "analog" ) :
143144
144145 if stream_id not in stream_ids :
145146 stream_ids .append (stream_id )
You can’t perform that action at this time.
0 commit comments