Ask questionsUnable to run launch targets with newest VS Code Python extension
When I try to launch one of my launch configurations, I get:
/Users/willy/src/doorstead/api/.venv/bin/python: can't open file '/Users/willy/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/ptvsd_launcher.py': [Errno 2] No such file or directory
It looks like the file ptvsd_launcher.py doesn't exist locally for me in the directory for the ms-python extension?
willy@willy-mbp: ~/.vscode/extensions $ ls -l ms-python.python-2019.10.44104/pythonFiles/
total 72
-rw-r--r-- 1 willy staff 25242 Oct 23 16:30 completion.py
drwxr-xr-x 8 willy staff 256 Oct 23 16:30 datascience
-rw-r--r-- 1 willy staff 2577 Oct 23 16:30 install_ptvsd.py
-rw-r--r-- 1 willy staff 290 Oct 23 16:30 interpreterInfo.py
drwxr-xr-x 3 willy staff 96 Oct 23 16:30 lib
If I downgrade to ms-python.python-2019.10.41019, then I can launch the target as expected (because ptvsd_launcher.py exists as expected):
willy@willy-mbp: ~/.vscode/extensions $ ls -l ms-python.python-2019.10.41019/pythonFiles/
total 184
-rw-r--r-- 1 willy staff 25242 Oct 23 16:43 completion.py
drwxr-xr-x 8 willy staff 256 Oct 23 16:43 datascience
-rw-r--r-- 1 willy staff 2464 Oct 23 16:43 install_ptvsd.py
-rw-r--r-- 1 willy staff 290 Oct 23 16:43 interpreterInfo.py
drwxr-xr-x 3 willy staff 96 Oct 23 16:43 lib
-rw-r--r-- 1 willy staff 5084 Oct 23 16:43 normalizeForInterpreter.py
-rw-r--r-- 1 willy staff 154 Oct 23 16:43 printEnvVariables.py
-rw-r--r-- 1 willy staff 1634 Oct 23 16:43 ptvsd_folder_name.py
-rw-r--r-- 1 willy staff 1015 Oct 23 16:43 ptvsd_launcher.py
-rw-r--r-- 1 willy staff 10909 Oct 23 16:43 refactor.py
-rw-r--r-- 1 willy staff 270 Oct 23 16:43 sortImports.py
-rw-r--r-- 1 willy staff 3040 Oct 23 16:43 symbolProvider.py
drwxr-xr-x 6 willy staff 192 Oct 23 16:43 testing_tools
-rw-r--r-- 1 willy staff 1452 Oct 23 16:43 testlauncher.py
-rw-r--r-- 1 willy staff 11923 Oct 23 16:43 visualstudio_py_testlauncher.py
Answer
questions
DonJayamanne
@willywu
Please could you uninstall the extension, then delete the folder ms-python.python-2019.10.41019
Next reload VS Code and reinstall the latest version of the extension.
Related questions