Fork me on GitHub

TypeError: write() argument must be str, not bytes

TypeError: write() argument must be str, not bytes


 

解决方案

使用二进制写入模式(‘wb’)来开启待操作文件,而不能像原来那样,采用字符写入模式(‘w’)。

 

posted @ 2022-12-12 19:46  龙凌云端  阅读(83)  评论(0编辑  收藏  举报