Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension keeps saying on save "Error Linter Pylint is not installed" even when already installed #437

Closed
blujedi opened this issue Dec 15, 2017 · 15 comments
Assignees
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@blujedi
Copy link

blujedi commented Dec 15, 2017

Environment data

VS Code version: 1.19.0
Python Extension version: 0.9.0
Python Version: 3.7.14 x64
OS and version: Windows 10 Pro 1709

Actual behavior

When saving a .py file VSCode/Python Extension keeps saying "Error Linter Pylint is not installed".
Selecting "Install Pylint" again only shows that it is already up to date.
While I can select "Don't show this prompt again" selecting that does not feel good because then it will probably not show up again at all (even when needed).

error linter pylint is not installed

Expected behavior

Speaks for itself: Only show error and options if true.

Steps to reproduce:

  • Install VSCode 1.19.0 on Windows
  • Install Python v2.7.14 x64
  • Install VSCode Python Extension v0.9.0
  • Open some python (.py) file, edit and save.

Logs

Output from Python output panel
When selecting "Install Pylint" again:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\Me> & "python" -m pip install -U pylint
Requirement already up-to-date: pylint in c:\python27\lib\site-packages
Requirement already up-to-date: ...
etc.

@blujedi blujedi changed the title Keeps saying on save "Error Linter Pylint is not installed" even when already installed Extension keeps saying on save "Error Linter Pylint is not installed" even when already installed Dec 15, 2017
@DonJayamanne DonJayamanne added awaiting 1-verification area-linting bug Issue identified by VS Code Team member as probable bug labels Dec 15, 2017
@DonJayamanne
Copy link

Please could you provide us the output from the the following:

  • Python output panel
  • console window (Help -> Toggle Developer Tools)

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed awaiting 1-verification labels Dec 15, 2017
@blujedi
Copy link
Author

blujedi commented Dec 16, 2017

Files are attached (anonymized, actual username is replaced with user).

pylint-not-installed_install-pylint_python-terminal-output.txt
pylint-not-installed_devtools-console.txt

@staffann
Copy link

Same problem for me, under Ubuntu 16.04. I use pylint3. It is chosen in the settings and is on the path. It always used to work but now suddently this error message pops up.

@DonJayamanne
Copy link

@blujedi do you have a workspace folder opened?

@blujedi
Copy link
Author

blujedi commented Dec 18, 2017

No I have not opened a workspace folder when the error occurs. Just editing a single Python file.

@brettcannon brettcannon added awaiting 1-verification and removed info-needed Issue requires more information from poster labels Dec 19, 2017
@staffann
Copy link

staffann commented Dec 21, 2017

I also add my console log. Of course we cannot be sure that the cause is the same as for bluejedi even though the symptom is the same. I do not have pylint installed, but I do have pylint3 installed and that is what the settings say should be used. That worked until now.

extensionHost.ts:290 [Extension Host] debugger listening on port 9333
extensionHost.ts:200 [Extension Host] debugger inspector at %cDebugger listening on port 9333.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
    chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9333/0b2a2125-dc8a-46fe-9b8c-3b5393211421

extensionService.ts:656 [/home/sni1lud/.vscode/extensions/ms-vscode.cpptools-0.14.5]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.
extensionService.ts:656 [/home/sni1lud/.vscode/extensions/ms-vscode.cpptools-0.14.5]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.
console.ts:123 [Extension Host] Python Extension: Error in errorHandler.handleError null
t.log @ console.ts:123
messageService.ts:126 Linter pylint is not installed
e.doShow @ messageService.ts:126
console.ts:123 [Extension Host] ApplicationInsights:Sender [Object]
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
console.ts:123 [Extension Host] (node:3892) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

@DonJayamanne
Copy link

@staffann looks like you're referring to an issue mentioned in #409.
Please could you vote on that issue (so we can track the number of people requesting this).

As a work around, please add something similar to the following in your user settings file:

"python.linting.flake8Path": "/usr/local/bin/flake8",
"python.linting.pydocstylePath": "/usr/local/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/bin/pylint"

@DonJayamanne
Copy link

@blujedi the output you have provided are from the terminal and console window.
I'm after the output from Python output panel. This would contain the output from the linter.

Here are the instructions to locate the Python output panel:

  • View -> Output menu
  • From the list of outputs (dropdown) select Python
    The list of outputs generally include:
    • Tasks
    • Search
    • Git
    • etc

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed awaiting 1-verification labels Dec 21, 2017
@DonJayamanne DonJayamanne added this to the January 2018 milestone Dec 21, 2017
@blujedi
Copy link
Author

blujedi commented Dec 21, 2017

The Python output panel is empty.
(I earlier included output from the Python terminal panel for that reason, which is not empty.)

empty python output panel

@karyon
Copy link

karyon commented Dec 23, 2017

i have the same error with both linting and formatting. for me, the python output panel contains this:

Formatting with autopep8 failed.
You could either install the 'autopep8' formatter, turn it off or use another formatter.
Error: spawn autopep8 ENOENT

btw, the first time i clicked the "install" option on the error message, the install failed because under windows, it tries to install into C:\Program Files, which fails because of missing privileges. i installed autopep8 manually with --user to fix this. the error still appears, but choosing the "install" option now reports autopep8 to be installed already.

@DonJayamanne
Copy link

@karyon there must be some errors logged in both thebPython output window as well as console window (accessible through Help->Toggle Developer Tools).
Please check and provide both.

@karyon
Copy link

karyon commented Dec 23, 2017

when i paste some code with the formatOnPaste option set to true, the error message is shown and the following appears in the python output:

Formatting with autopep8 failed.
You could either install the 'autopep8' formatter, turn it off or use another formatter.
Error: spawn autopep8 ENOENT

debug console:

Formatter autopep8 is not installed messageService.ts:126
e.doShow | @ | messageService.ts:126
  | e.show | @ | messageService.ts:105
  | (anonymous) | @ | mainThreadMessageService.ts:71
  | n.Class.derive._oncancel | @ | winjs.base.raw.js:1641
  | e._showMessage | @ | mainThreadMessageService.ts:41
  | e.$showMessage | @ | mainThreadMessageService.ts:35
  | e.invoke | @ | abstractThreadService.ts:42
  | e._invokeHandler | @ | rpcProtocol.ts:109
  | e._receiveOneMessage | @ | rpcProtocol.ts:96
  | (anonymous) | @ | rpcProtocol.ts:32
  | (anonymous) | @ | rpcProtocol.ts:157
  | e.fire | @ | event.ts:142
  | (anonymous) | @ | ipc.net.ts:81
  | emitOne | @ | events.js:96
  | emit | @ | events.js:191
  | readableAddChunk | @ | _stream_readable.js:178
  | Readable.push | @ | _stream_readable.js:136
  | onread | @ | net.js:560

@DonJayamanne
Copy link

@karyon what are your settings in settings.json?

@karyon
Copy link

karyon commented Dec 23, 2017

{
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.formatOnPaste": true,
    "python.linting.lintOnSave":true,
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
}

@brettcannon brettcannon added awaiting 1-verification and removed info-needed Issue requires more information from poster labels Jan 2, 2018
@MikhailArkhipov MikhailArkhipov self-assigned this Jan 5, 2018
@MikhailArkhipov
Copy link

I believe I might have fixed it in #532

See change in common/helpers.ts and formatters/baseFormatter.ts

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

6 participants