Type Error:an integer is required的解决方法
TypeError: an integer is required 的解决方法
在执行open函数操作文件时,会出现题目中的错误。
看其他博客说由于从os模块引入了所有的函数导致的!
我之所以造成这样的原因是因为在执行open函数时,在参数操作模式后直接传入了“utf-8”。
具体解决方法:
在“utf-8”前加上“encoding=”即可解决!
...
原创
2020-06-26 16:18:11 ·
19150 阅读 ·
0 评论