【发布时间】:2015-09-12 07:01:12
【问题描述】:
我在 Windows 计算机上安装了 Anaconda,Spyder 工作正常,但通过静态代码分析功能运行 pylint 会出错。 Pylint 是通过 Conda 安装的。
注意:Spyder 中的错误不允许我直接复制和粘贴文本。使用图片到文本转换器得到下面的代码,所以可能有几个字符脱落...
No config file found, using default configuration Traceback (most recent call last):
File "C: \Users\ Username \AppData \Local \Continuum \Anaconda \Scripts\pylint-script.py", line 2, in <module>
run_pylint()
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\_init_.py", line 23, in run_pylint
Run(sys.argv[1:])
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\lint.py", line 1313, in _init_
lintercheck(args)
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\lint.py", line 729, in check
self._do_check(files_or_modules)
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\lint.py", line 831, in _do_check
for descr in self.expand_files(files_or_modules):
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\lint.py", line 872, in expand_files
self.add_message(key, args=message)
File "C: \Users\ USERNAME \AppData \Local \Continuum \Anaconda \lib\site-packages\pylint\utils.py", line 390, in add_message
self.stats['by_moduld][self.current_name][msg_cat] += 1
KeyError: None
有人对决议有任何想法吗?谢谢!
【问题讨论】:
-
你有sn-p来重现它吗?
-
无论我输入了什么代码,当我在静态代码分析部分单击“分析”时都会发生这种情况。我尝试在编辑窗口中使用简单的打印语句,但仍然出现错误。
标签: python anaconda spyder pylint