解决方案:修改打开文件的方式:encoding='gbk'
with open(list_path, "r") as file: #有修改 self.img_files = file.readlines()
改成:
with open(list_path, "r", encoding='gbk') as file: #有修改
self.img_files = file.readlines()
解决方案:修改打开文件的方式:encoding='gbk'
with open(list_path, "r") as file: #有修改 self.img_files = file.readlines()
改成:
with open(list_path, "r", encoding='gbk') as file: #有修改
self.img_files = file.readlines()