登录社区云,与社区用户共同成长
邀请您加入社区
【代码】python 读取word文件,报错zipfile.BadZipfile: File is not a zip file。
报错为:zipfile.BadZipfile: File is not a zip file
zipfile.BadZipfile: File is not a zip file
原本代码为:
with open(template, 'r') as f:
将代码修改为: 以二进制模式打开文件即可解决:
with open(template, 'rb') as f:
汇聚全球AI编程工具,助力开发者即刻编程。
更多推荐
告别AI无效对话:资深工程师的提示词设计最佳实践
Qoder AI编辑器助手技术选型与实施汇报
【AI日报】每日AI最新消息2026-02-10
扫一扫分享内容
所有评论(0)