Python extension throwing various errors after VS Code update to 1.56.1
See original GitHub issueEnvironment data
- VS Code version: 1.56.1
- Extension version (available under the Extensions sidebar): v2021.5.829140558
- OS and version: Windows 10 Pro ; Version 10.0.19042 Build 19042
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3.7.6 64-bit (but the same error can be replicated with any installed distribution)
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: N/A
- Relevant/affected Python-related VS Code extensions and their versions: N/A
- Value of the
python.languageServersetting: Microsoft (or any other)
[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
When starting a new debug session the first breakpoint in previously working program should be hit without any warnings or errors.
Actual behaviour
The breakpoint is hit, but there are errors in the debug output even before the script ‘initializes’. Reloading the window, changing Python environment or reinstalling Python, Jupyter and other affected extensions solves nothing.
Steps to reproduce:
- Update VS Code in Win 10 to 1.56.1.
- Set a breakpoint in a Python script.
- Start debugging session - breakpoint is hit but a bunch of errors get written to the output before the main Python file even launches.
Temporary solution
The only way to get rid of these errors is to revert to previous version of the Python extension (v2021.4.765268190).
Logs
Output log, pop-up error message, debug output
Output log
User belongs to experiment group 'pythonaa'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'ShowExtensionSurveyPrompt - control'
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 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'RunByLine - experiment'
Python interpreter path: C:\ProgramData\Anaconda3\python.exe
Starting Microsoft Python language server.
Python interpreter path: C:\Program Files (x86)\Python37-32\python.exe
Starting Microsoft Python language server.
Python interpreter path: C:\ProgramData\Anaconda3\python.exe
Pop-up message
Cannot activate the 'Python' extension because it depends on the 'Jupyter' extension, which is not loaded. Would you like to reload the window to load the extension?
Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-win-x64.0.5.59.nupkg...
Language server download failed
Error: connect ETIMEDOUT 13.107.213.60:443
pydev debugger: critical: unable to get real case for file. Details:
filename: src
drive:
parts: ['src']
(please create a ticket in the tracker to address this).
Debugger output
pydev debugger: critical: unable to get real case for file. Details:
filename: src
drive:
parts: ['src']
(please create a ticket in the tracker to address this).
Traceback (most recent call last):
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 221, in _get_path_with_real_case
return _resolve_listing(drive, iter(parts))
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 184, in _resolve_listing
dir_contents = cache[resolved_lower] = os.listdir(resolved)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 226, in _get_path_with_real_case
return _resolve_listing(drive, iter(parts))
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 184, in _resolve_listing
dir_contents = cache[resolved_lower] = os.listdir(resolved)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
pydev debugger: critical: unable to get real case for file. Details:
filename: src
drive:
parts: ['src']
(please create a ticket in the tracker to address this).
Traceback (most recent call last):
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 221, in _get_path_with_real_case
return _resolve_listing(drive, iter(parts))
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 184, in _resolve_listing
dir_contents = cache[resolved_lower] = os.listdir(resolved)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 226, in _get_path_with_real_case
return _resolve_listing(drive, iter(parts))
File "c:\...\.vscode\extensions\ms-python.python-2021.5.829140558\pythonFiles\lib\python\debugpy\_vendored\pydevd\pydevd_file_utils.py", line 184, in _resolve_listing
dir_contents = cache[resolved_lower] = os.listdir(resolved)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
No results found
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

Closing as a dupe of #16209, please let us know if upgrading to v2021.6.832593372 doesn’t work for you. Thanks and sorry for the trouble!
Solved with the new Python extension update - thanks for the help @joyceerhl! The new language server works great as well.