python2.7-encoding报错

 

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

运行报错:

修改:(导入IO模块)

 

posted @ 2018-02-08 14:35  songge1209  阅读(380)  评论(0编辑  收藏  举报