Error while checking Pylint path
See original GitHub issueStep 1: Are you in the right place?
- I have verified there are no duplicate active or recent bugs, questions, or requests
- I have verified that I am using the latest version of the plugin.
Step 2: Describe your environment
- Plugin version:
v0.10.2
- PyCharm/IDEA version:
IDEA 2018.3.2
- Pylint version:
1.5.5
Step 3: Describe the problem:
Steps to reproduce:
- Install pyenv, pyenv-virtualenv, and python 2.7.15
- Create a virtualenv with
pyenv virtualenv 2.7.15 venvname
pip install pylint==1.5.5
- Open IDEA, create a python project using the above venvname as the python sdk
- Close IDEA, reopen it
- Error is thrown
Observed Results:
- An error in the event log. The plugin seems to keep working even though it throws that error.
Expected Results:
- No error to be thrown.
Relevant Code:
No code to report
java.lang.Throwable: Error while checking Pylint path: File "/Users/thiago.oliveira/.pyenv/shims/pylint", line 3
[ -n "$PYENV_DEBUG" ] && set -x
^
SyntaxError: invalid syntax
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.leinardi.pycharm.pylint.plapi.PylintRunner.isPylintPathValid(PylintRunner.java:98)
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)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6548)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
at java.awt.Component.processEvent(Component.java:6313)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4903)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4725)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1077)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:698)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1681)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1630)
at com.intellij.openapi.options.newEditor.SettingsDialog.lambda$show$0(SettingsDialog.java:70)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
at com.intellij.openapi.options.newEditor.SettingsDialog.show(SettingsDialog.java:70)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:84)
at com.intellij.ide.actions.ShowSettingsAction.perform(ShowSettingsAction.java:50)
at com.intellij.ide.MacOSApplicationProvider$Worker.lambda$null$1(MacOSApplicationProvider.java:104)
at com.intellij.ide.MacOSApplicationProvider$Worker.lambda$submit$7(MacOSApplicationProvider.java:179)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$pollQueueLater$0(TransactionGuardImpl.java:74)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:668)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Error while executing Pylint command from terminal on ...
It looks like Pylint is unable to parse your command properly. if you want to ... if for a specific file use the...
Read more >A curated list of pylint errors with explanation and examples
A list of pylint-errors with reasoning and examples of erroneous and correct ... directory where pipx stores apps is on PATH $ python3...
Read more >Pylint Errors | Improve Your Code with Pylint and Black
If you are using pre-commit, the Pylint errors will be the same as if using Pylint alone. We highly recommend using pre-commit. For...
Read more >Running Pylint - Pylint 2.16.0-dev documentation
Discovered problems by checkers are not displayed immediately. They are shown just after checking a module is complete.
Read more >Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same issue on OSX Mojave with IDEA 2018.3. Details below:
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: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!
I’m no longer seeing the original issue that was reported. But I’m seeing the issue @borice mentioned.