Skip to content

Commit e6151ef

Browse files
committed
Fix for wrann error when only label_store is passed. #260
1 parent a6a9a01 commit e6151ef

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)