Skip to content

Commit 1e07a65

Browse files
author
sprenger
committed
[tdt] fix header parsing to not include non-ascii chars in name or type
1 parent 52d703d commit 1e07a65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo/rawio/tdtrawio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ def read_tbk(tbk_filename):
522522

523523
# parse into a dict
524524
info = OrderedDict()
525-
pattern = br'NAME=(\S+);TYPE=(\S+);VALUE=(\S+);'
525+
# name and type have to be words, but value can contain floating numbers
526+
pattern = br'NAME=(\w+);TYPE=(\w+);VALUE=(\S+);'
526527
r = re.findall(pattern, chan_grp_header)
527528
for name, _type, value in r:
528529
info[name.decode('ascii')] = value

0 commit comments

Comments
 (0)