Skip to content

Missing linter/formatter not prompted to install #14828

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

Closed
josephgruber opened this issue Nov 26, 2020 · 3 comments
Closed

Missing linter/formatter not prompted to install #14828

josephgruber opened this issue Nov 26, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@josephgruber
Copy link

josephgruber commented Nov 26, 2020

Environment data

  • VS Code version: 1.51.1
  • Extension version (available under the Extensions sidebar): v2020.11.371526539
  • OS and version: Mac OS 10.15.7 (Catalina) and Mac OS 11.0.1 (Big Sur)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.0, 3.8.6, 3.8.5
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Pipenv, venv
  • Relevant/affected Python packages and their versions: flake8, bandit, pycodestyle, mypy, pylint, autopep8, etc.
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Jedi and Pylance

Expected behavior

When an enabled linter or formatter is missing, VS Code will present a popup via the Python extension to "Install" (along with other options)

Actual behavior

Missing linters are (occasionally) not prompted to install. No popup is presented. The Python extension output notes these are missing (see logs below) however. Occasionally, when replicating the issue, the first missing linter receives a popup to install but not always.

Steps to reproduce:

  1. Enable a linter or formatter in VS Code Settings. For example,
"python.linting.banditEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black"
  1. Open a Python file in VS Code (or create a blank Python file such as test.py)

Logs

Output for Python in the Output panel
User belongs to experiment group 'AlwaysDisplayTestExplorer - experiment'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - experiment'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonInstallFlake8ButtonFirst'
> conda --version
> conda info --json
> python3.7 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
Error 2020-11-26 11:59:51: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file '/Users/josephgruber/Desktop/vscode_linter_test/.vscode/settings.json' (EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/Users/josephgruber/Desktop/vscode_linter_test/.vscode/settings.json')
	at _handleError (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:730:838)
	at processTicksAndRejections (internal/process/task_queues.js:94:5)
	at async y.readText (/Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:9:152841)
	at async p.doesFileNeedToBeFixed (/Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:469606)
	at async /Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:468733
	at async Promise.all (index 1)
	at async p.getFilesToBeFixed (/Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:468679)
	at async p.updateTestSettings (/Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/out/client/extension.js:39:468306)] {
  code: 'FileNotFound',
  name: 'EntryNotFound (FileSystemError)'
}
Starting Jedi Python language engine.
Python interpreter path: /usr/local/opt/python/libexec/bin/python
> conda --version
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py site --user-site
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py site --user-site
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py
Error 2020-11-26 11:59:52: stderr jediProxy Error (stderr) /Users/josephgruber/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/completion.py:584: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
  jedi.api.names(

> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py bandit -f custom --msg-template {line},0,{severity},{test_id}:{msg} -n -1 ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py bandit -f custom --msg-template {line},0,{severity},{test_id}:{msg} -n -1 ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py flake8 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pycodestyle --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pycodestyle --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text ~/Desktop/vscode_linter_test/linter_test.py
cwd: ~/Desktop/vscode_linter_test
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import bandit"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import mypy"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pycodestyle"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import flake8"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"
> /usr/local/opt/python/libexec/bin/python ~/.vscode/extensions/ms-python.python-2020.11.371526539/pythonFiles/pyvsc-run-isolated.py -c "import pylint"

Linter 'bandit' is not installed. Please install it or select another linter".
Error: Module 'bandit' not installed.

Linter 'mypy' is not installed. Please install it or select another linter".
Error: Module 'mypy' not installed.

Linter 'pycodestyle' is not installed. Please install it or select another linter".
Error: Module 'pycodestyle' not installed.

Linter 'flake8' is not installed. Please install it or select another linter".
Error: Module 'flake8' not installed.

Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.

@josephgruber josephgruber added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Nov 26, 2020
@josephgruber
Copy link
Author

Possibly related to #14829

@karthiknadig karthiknadig self-assigned this Nov 30, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Nov 30, 2020
@karthiknadig
Copy link
Member

Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority.

If you think your issue is more of a question or configuration problem rather than a bug, please ask on Stack Overflow with the visual-studio-code and python labels for help.

Thanks for your understanding and patience!

@karthiknadig
Copy link
Member

@josephgruber we have not seen other reports of this. I am assuming this is now addressed. Closing this for now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants