If you encounter the above problems, please follow the following additional coding format to solve.
in_file = open('VOCdevkit/VOC%s/Annotations/%s.xml'%(year, image_id), encoding='UTF_8')
trouble
in_file = open('VOCdevkit/VOC%s/Annotations/%s.xml'%(year, image_id))
method
in_file = open('VOCdevkit/VOC%s/Annotations/%s.xml'%(year, image_id), encoding='UTF_8')