如何解决Pylint抛出configparser.MissingSectionHeaderError:
我可以使用pylint测试python文件
代码在下面
""" Testing the file inside the content"""
import json
file = r'test.txt'
with open(file,'r') as fr:
fd = fr.read()
print (fd)
下面是要测试的命令
pylint code.py
错误在下面
raise MissingSectionHeaderError(fpname,lineno,line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: 'C:\\Users\\ayshewew\\.pylintrc',line: 2
'import json\n'
我已经在jupyter笔记本中执行了上述代码,并且工作正常
我的pylint是最新版本
解决方法
尝试
python -m pylint code.py
得到了输出
工作
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。