Skip to content

No more prompt to install a linter in 2021.4 #16027

@ssstain

Description

@ssstain

Environment data

  • VS Code version: 1.55.2
  • Extension version (available under the Extensions sidebar): v2021.4.765268190
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.4 (miniconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: flake8, pycodestyle, mypy
  • Relevant/affected Python-related VS Code extensions and their versions: XXX
  • Value of the python.languageServer setting: Pylance

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Expected behaviour

Fresh venv contains no linters (flake8, mypy etc). Previously VS Code has notified about their absence and offered to install missing packages within the UI. Now it keeps silent throwing errors in the Python output. Whilst there should be a notification pop-up with the 'Install' missing package button.

Actual behaviour

When there are no linters installed VS Code says nothing about their absence throwing only errors in a Python extension output.
i.e.:

Linter 'mypy' is not installed. Please install it or select another linter".
Error: Module 'mypy' not installed.
Error 2021-04-23 20:53:35: NotInstalledErrorHandler.promptToInstall Error: Unknown product 11
    at D.createInstaller (c:\Users\$$$$$$$\.vscode\extensions\ms-python.python-2021.4.765268190\out\client\extension.js:9:485477)
    at D.promptToInstall (c:\Users\$$$$$$$\.vscode\extensions\ms-python.python-2021.4.765268190\out\client\extension.js:9:484598)

The same happens for flake8, pycodestyle, bandit and others according to your VS Code python extension settings.

Steps to reproduce:

  1. python -m venv .venv
  2. Run VS Code
  3. silence
  4. switch to python output window to see error messages

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Linter 'mypy' is not installed. Please install it or select another linter". Error: Module 'mypy' not installed. Error 2021-04-23 20:53:35: NotInstalledErrorHandler.promptToInstall Error: Unknown product 11 at D.createInstaller (c:\Users\$$$$$$$\.vscode\extensions\ms-python.python-2021.4.765268190\out\client\extension.js:9:485477) at D.promptToInstall (c:\Users\$$$$$$$\.vscode\extensions\ms-python.python-2021.4.765268190\out\client\extension.js:9:484598)

Metadata

Metadata

Assignees

Labels

area-lintingbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityregressionBug didn't exist in a previous release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions