Open chilicheech opened 5 years ago
I have same problem
PyCharm 2017.3.4 (Professional Edition) Build #PY-173.4674.37, built on March 6, 2018 JRE: 1.8.0_152-release-1024-b15 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 7 6.1
Error while checking Pylint path: No config file found, using default configuration java.lang.Throwable: Error while checking Pylint path: No config file found, using default configuration at com.intellij.openapi.diagnostic.Logger.error(Logger.java:136) at com.leinardi.pycharm.pylint.plapi.PylintRunner.isPylintPathValid(PylintRunner.java:98) at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:176) at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:150) at com.leinardi.pycharm.pylint.PylintInspection.inspectFile(PylintInspection.java:76) at com.leinardi.pycharm.pylint.PylintInspection.lambda$checkFile$0(PylintInspection.java:65) at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:338) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
but I already configured option "Path to pylintrc"
And plugin also start checking in SQL console too after CTRL+S.
I'll have to disable the plugin due to this failure to find pylint (using all the default plugin settings, no explicit override for the pylint path). Even with an explict override for the pylint path, the plugin still issues errors about a failure to find it.
$ pipenv --version
pipenv, version 2018.11.26
$ which pylint /home/{snipped}/.local/share/virtualenvs/py_package_template-AfLMl-fG/bin/pylint
$ pylint --version pylint 2.1.1 astroid 2.0.4 Python 3.7.0 (default, Jun 28 2018, 13:15:42) [GCC 7.2.0]
- PyCharm version: 2018.3.2
PyCharm 2018.3.2 (Professional Edition) Build #PY-183.4886.43, built on December 18, 2018 JRE: 1.8.0_152-release-1343-b26 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-43-generic
The stacktrace is:
java.lang.Throwable: Pylint path detect process.exitValue: 1 at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134) at com.leinardi.pycharm.pylint.plapi.PylintRunner.detectSystemPylintPath(PylintRunner.java:218) at com.leinardi.pycharm.pylint.plapi.PylintRunner.getPylintPath(PylintRunner.java:144) at com.leinardi.pycharm.pylint.plapi.PylintRunner.getPylintPath(PylintRunner.java:120) at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:176) at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:150) at com.leinardi.pycharm.pylint.PylintInspection.inspectFile(PylintInspection.java:76) at com.leinardi.pycharm.pylint.PylintInspection.lambda$checkFile$0(PylintInspection.java:65) at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:337) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
I get the same error with these versions:
pylint 1.9.4,
astroid 1.6.5
Python 2.7.15 (default, Dec 18 2018, 14:05:33)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)]
pyenv 1.2.8
Because I'm using pyenv
with pyenv-virtualenv
it creates a shim for pylint so that it points to the correct one for that virtualenv: /Users/thiago.oliveira/.pyenv/shims/pylint
. The contents of this file are:
#!/usr/bin/env bash
set -e
[ -n "$PYENV_DEBUG" ] && set -x
program="${0##*/}"
if [[ "$program" = "python"* ]]; then
for arg; do
case "$arg" in
-c* | -- ) break ;;
*/* )
if [ -f "$arg" ]; then
export PYENV_FILE_ARG="$arg"
break
fi
;;
esac
done
fi
export PYENV_ROOT="/Users/thiago.oliveira/.pyenv"
exec "/usr/local/Cellar/pyenv/1.2.8_1/libexec/pyenv" exec "$program" "$@"
Not sure why it thinks this is invalid syntax: [ -n "$PYENV_DEBUG" ]
. It's perfectly valid bash syntax.
When I point it to the actual file /Users/thiago.oliveira/.pyenv/versions/2.7.15/bin/pylint
it works fine. Here's the contents of the actual file:
#!/Users/thiago.oliveira/.pyenv/versions/2.7.15/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pylint import run_pylint
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_pylint())
Please add support for pyenv-virtualenv
if it isn't yet supported.
I have the same issue on OSX Mojave with IDEA 2018.3. Details below:
> pylint --version
pylint 2.2.2
astroid 2.1.0
Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
java.lang.Throwable: Pylint path detect process.exitValue: 1
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.detectSystemPylintPath(PylintRunner.java:218)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.getPylintPath(PylintRunner.java:144)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.getPylintPath(PylintRunner.java:120)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:176)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.checkPylintAvailable(PylintRunner.java:150)
at com.leinardi.pycharm.pylint.PylintInspection.inspectFile(PylintInspection.java:76)
at com.leinardi.pycharm.pylint.PylintInspection.lambda$checkFile$0(PylintInspection.java:65)
at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:337)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This happens when I'm working on a non-Python project (like Java, Scala, whatever) and I don't manually configure the pylint path in the "Other Settings -> Pylint" section. If I work on a Python project and set the path to Pylint then the error doesn't show up.
Even if I try setting the Pylint path when working on a non-Python project, when I click the "Test" button, a red X is displayed indicating that the test didn't succeed. When looking at the idea.log
file, the following error is recorded:
INFO - harm.pylint.plapi.PylintRunner - Command Line string: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home /Applications/Development/anaconda3/bin/pylint --help-msg E1101 ile checking Pylint path
com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home": error=13, Permission deniedon.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:416)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.isPylintPathValid(PylintRunner.java:92)
at com.leinardi.pycharm.pylint.ui.PylintConfigPanel$TestAction.actionPerformed(PylintConfigPanel.java:115)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
....
It seems the plugin is trying to run pylint using the current project's SDK which, for a Java project (for example) would be the JDK. Obviously that won't work. I think this happens here: https://github.com/leinardi/pylint-pycharm/blob/4af2fe58d7edc3c3d187d538b6bd4308493f32f7/src/main/java/com/leinardi/pycharm/pylint/plapi/PylintRunner.java#L318
Perhaps this plugin should skip the detection of pylint for non-Python projects (if possible).
Thanks for the plugin!
This issue has been automatically marked as stale because it has not had activity in the last 60 days.
This issue has been automatically marked as stale because it has not had activity in the last 60 days.
I'm no longer seeing the original issue that was reported. But I'm seeing the issue @borice mentioned.
Step 1: Are you in the right place?
Step 2: Describe your environment
v0.10.2
IDEA 2018.3.2
1.5.5
Step 3: Describe the problem:
Steps to reproduce:
pyenv virtualenv 2.7.15 venvname
pip install pylint==1.5.5
Observed Results:
Expected Results:
Relevant Code:
No code to report