报错为:zipfile.BadZipfile: File is not a zip file
原本代码为:
with open(template, 'r') as f:
将代码修改为:
以二进制模式打开文件即可解决:
with open(template, 'rb') as f:
报错为:zipfile.BadZipfile: File is not a zip file
原本代码为:
with open(template, 'r') as f:
将代码修改为:
以二进制模式打开文件即可解决:
with open(template, 'rb') as f: