I've installed Anaconda on a Windows computer and Spyder works fine, but running pylint through the Static Code Analysis feature gives an error. Pylint was installed through Conda.
Note: Error in Spyder would not allow me to copy and paste text directly. Used a picture to text converter to get the code below so there may be a few characters off...
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 a resolution? Thank you!
If you press F8 (Source> Run Static Code Analysis) this should work.
The analyse button in the pane tells it to analyse whatever file is in the Static code analysis drop down to the left of the button. If there is nothing in there it seems to get very confused.
Pressing F8 autopopulates the drop down with the current file being edited, so saves you navigating to wherever it is.
Previously I had been clicking into the editor and then hitting "Analyze" through the Static Code Analysis feature which was producing the error above.
If instead, I clicked on the folder within the Static Code Analysis pane and browsed to the .py file, the Static Code Analysis seemed to run appropriately without an error!
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With