Pylint does not work in Spyder

I installed Anaconda on a Windows computer and Spyder works fine, but running pylint through the static code analysis function gives an error. The peelint was installed through Conda.

Note. An error in Spyder will not allow me to copy and paste text directly. I used the image in a text converter to get the code below so that there are not a few characters left ...

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 

Does anyone have any thoughts on resolution? Thanks!

+5
source share
3 answers

If you press F8 (Source> Run Static Code Analysis), this should work.

The analysis button in the panel tells him to analyze any file in the analysis of static code that appears to the left of the button. If there is nothing there, it seems he is very confused.

Pressing the F8 key automatically pops up a drop-down menu with the current file being edited, so it saves the navigation to where it is.

+4
source

I used to click in the editor, and then click "Analyze" through the static code analysis function, which caused the error above.

If instead I clicked on a folder in the static code analysis panel and looked at the .py file, the static code analysis seemed to work properly without errors!

Thanks!

+2
source

I have the same problem on Arch Linux, Python 3.4.3, PyLint 1.4.4.

If I use Python 2.7 instead, it works as expected. I think Spyder / Pylint does not work with Python 3.

It is assumed that you are using Python 3.

0
source

All Articles