pylint-pycharm icon indicating copy to clipboard operation
pylint-pycharm copied to clipboard

Pylint 3.0.0a1 crash

Open baterflyrity opened this issue 3 years ago • 10 comments

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 avatar Mar 30 '21 12:03 baterflyrity

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')

baterflyrity avatar Mar 30 '21 12:03 baterflyrity

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

leinardi avatar Mar 30 '21 12:03 leinardi

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

baterflyrity avatar Mar 30 '21 12:03 baterflyrity

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 :)

Pierre-Sassoulas avatar Mar 30 '21 13:03 Pierre-Sassoulas

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

baterflyrity avatar Mar 30 '21 13:03 baterflyrity

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

image

leinardi avatar Mar 30 '21 13:03 leinardi

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.

Pierre-Sassoulas avatar Mar 30 '21 14:03 Pierre-Sassoulas

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

baterflyrity avatar Mar 30 '21 18:03 baterflyrity

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.

e2m4n avatar Aug 26 '21 13:08 e2m4n

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

baterflyrity avatar Sep 09 '21 13:09 baterflyrity