Skip to content

Commit 6582b17

Browse files
authored
Merge pull request MIT-LCP#279 from MIT-LCP/wrann
Fixes NoneType error in wfdb.io.wrann when using label_store instead of symbol MIT-LCP#260
2 parents 5c46c15 + e16a1c6 commit 6582b17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

wfdb/io/annotation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ def wrann(self, write_fs=False, write_dir=''):
280280
if 'label_store' not in present_label_fields:
281281
self.convert_label_attribute(source_field=present_label_fields[0],
282282
target_field='label_store')
283+
284+
# Calculate the symbol field if necessary
285+
if 'symbol' not in present_label_fields:
286+
self.convert_label_attribute(source_field=present_label_fields[0],
287+
target_field='symbol')
283288

284289
# Write the header file using the specified fields
285290
self.wr_ann_file(write_fs=write_fs, write_dir=write_dir)

0 commit comments

Comments
 (0)