1 TypeError: must be str, not bytes错误: 2 3 解答: 4 写文件处 f=open(filename, ‘w‘)应该写为 open(filename, ‘wb‘) 5 读文件时 f=open(filename,‘rb‘) UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x80 in position 0: illegal multibyte sequence解决方法同上
时间: 2024-10-08 17:35:12