Fix build error for qt5+py3
This commit is contained in:
@@ -26,7 +26,7 @@ class PascalVocWriter:
|
||||
"""
|
||||
rough_string = ElementTree.tostring(elem, 'utf8')
|
||||
root = etree.fromstring(rough_string)
|
||||
return etree.tostring(root, pretty_print=True, encoding=ENCODE_METHOD).replace(' ', '\t')
|
||||
return etree.tostring(root, pretty_print=True, encoding=ENCODE_METHOD).replace(" ".encode(), "\t".encode())
|
||||
# minidom does not support UTF-8
|
||||
'''reparsed = minidom.parseString(rough_string)
|
||||
return reparsed.toprettyxml(indent="\t", encoding=ENCODE_METHOD)'''
|
||||
|
||||
Reference in New Issue
Block a user