Closed
Description
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:
- Enable a linter or formatter in VS Code Settings. For example,
"python.linting.banditEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black"
- 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.