原文:TypeError: 'encoding' is an invalid keyword argument for this function 解决Python 2.7

在python . 中这样调用代码 open file name.txt , r ,encoding utf .read 会出现 TypeError: encoding is an invalid keyword argument for this function 这样的错误 需要将代码修改为 import io io.open file name.txt , r ,encoding utf . ...

2018-09-29 23:09 0 1728 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM