Skip to content

Commit 4f20f46

Browse files
authored
Fix attributes with spaces in names (#1305)
1 parent 7960447 commit 4f20f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datumaro/datumaro/components/dataset_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def encode_annotation_base(cls, annotation):
4848
ET.SubElement(ann_elem, 'type').text = str(annotation.type.name)
4949

5050
for k, v in annotation.attributes.items():
51-
ET.SubElement(ann_elem, k).text = str(v)
51+
ET.SubElement(ann_elem, k.replace(' ', '-')).text = str(v)
5252

5353
ET.SubElement(ann_elem, 'group').text = str(annotation.group)
5454

0 commit comments

Comments
 (0)