leinardi / pylint-pycharm

A plugin providing both real-time and on-demand scanning of Python files with PyLint from within PyCharm/IDEA.
Apache License 2.0
196 stars 35 forks source link

Pylint 3.0.0a1 crash #79

Open baterflyrity opened 3 years ago

baterflyrity commented 3 years ago

Ok, let's debug it together then :) Can you open a pylint issue with the pylint >command launched just before the crash and the code on which it was launched ?

Originally posted by @Pierre-Sassoulas in https://github.com/leinardi/pylint-pycharm/issues/41#issuecomment-810166482

baterflyrity commented 3 years ago

step 1: press start button step 2: wait until scanning is finished

изображение

error:

изображение

The scan failed due to an exception: An error occurred while scanning a file. Root cause: null 
java.lang.NullPointerException   at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)   at 
java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)   at 
java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)   at 
java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)   at 
java.base/java.nio.file.Path.of(Path.java:147)   at java.base/java.nio.file.Paths.get(Paths.java:69)   at 
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.normalisePath(ProcessResultsThread.java:117)   at 
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.filenameFrom(ProcessResultsThread.java:111)   at 
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.run(ProcessResultsThread.java:86)   at 
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:860)   at 
com.leinardi.pycharm.pylint.checker.ScanFiles.scan(ScanFiles.java:120)   at 
com.leinardi.pycharm.pylint.checker.ScanFiles.checkFiles(ScanFiles.java:100)   at 
com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:74)   at 
com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:46)   at 
com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)   at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)   at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)   at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)   at 
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)   at 
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)   at 
java.base/java.security.AccessController.doPrivileged(Native Method)   at 
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)   at 
java.base/java.lang.Thread.run(Thread.java:834)

code:

print('Hello, world')
leinardi commented 3 years ago

I guess @Pierre-Sassoulas suggestion's was to open an issue on the official PyLint issue tracker: https://github.com/PyCQA/pylint/issues

baterflyrity commented 3 years ago

@leinardi I dont know. Lets ask him) @Pierre-Sassoulas, hey, what did u mean?

Pierre-Sassoulas commented 3 years ago

Yeah, sorry I was not very clear. If it's a crash inside pylint the issue could be opened in https://github.com/PyCQA/pylint/issues. I would need the actual pylint command launched by pylint-pycharm for this file in order to do something about the crash. Maybe something like pylint -sy -rn ... hello_world.py. I do not have the knowledge to debug pylint-pycharm directly. But I think opening this issue can permit to track the root cause :)

baterflyrity commented 3 years ago

@Pierre-Sassoulas, Thanks for help but i dont know command((

leinardi commented 3 years ago

@baterflyrity you should be able to find the pylint command inside the PyCharm log files, just look for the text Command Line string:

image

Pierre-Sassoulas commented 3 years ago

The thing is we did not release this in 2.x version because having --score=yes would not output score. So breaking thing is expected when suddenly pylint output the score. It's entirely possible that pylint-pycharm now breaks because the newly added score is not parsed correctly.

baterflyrity commented 3 years ago

@leinardi , what is really surprising is that in log no pylint command is stated anywhere.

e2m4n commented 2 years ago

The thing is we did not release this in 2.x version because having --score=yes would not output score. So breaking thing is expected when suddenly pylint output the score. It's entirely possible that pylint-pycharm now breaks because the newly added score is not parsed correctly.

Thanks for the hint. After updating to pylint v3 my pycharm plugin was saying "Pylint found no problems" for everything, but it was working if I ran it from a terminal. Now if I put "--score=no" in the arguments section of the plugin settings then it works again.

baterflyrity commented 2 years ago

Consider updating pylint version bundled with the plugin to actual one from pypi (it is 2.10.2 but 3.*).