当前位置:首页 > Python教程 > python技巧

python2.7-encoding报错

 

原代码中:self.file = open(‘data.json‘, ‘w‘, encoding=‘utf-8‘)

运行报错:技术分享图片

修改:(导入IO模块)

技术分享图片

 

原文:https://www.cnblogs.com/songge1209/p/8431412.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐