-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Pylance not starting in specific projects #24852
Comments
We don't actually start the server ourselves. The core python extension is responsible for that. Transferring. |
@bruecksen Try adding this to your user settings and reload. See if that addresses the issue.
|
@karthiknadig no this doesn't change anything. Can I provide any more information about this issue? |
got same problem, pylance seems not start.
here is my environment: |
@bruecksen Can you share the logs from Output > Python? I recommend setting the log level to Trace via @tracerbiubiubiu Try adding the setting I mentioned in: #24852 (comment) and also try running |
hi,i have tried these ways below:
and run
it seems there is no output in python language server
|
@karthiknadig I tried clear cache and setting the log level. Here is the Python output log. Now with the log level set to trace i see the pyenv error. I don't use pyenv. Is this something i can configure/disable? python output log2025-03-07 08:12:16.377 [info] Experiment 'pythonTerminalEnvVarActivation' is inactive
2025-03-07 08:12:16.377 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-03-07 08:12:16.377 [info] Experiment 'pythonTestAdapter' is active
2025-03-07 08:12:16.377 [info] Native locator: Refresh started
2025-03-07 08:12:16.377 [info] Native locator: Refresh started
2025-03-07 08:12:16.377 [info] > pyenv which python
2025-03-07 08:12:16.377 [info] cwd: .
2025-03-07 08:12:16.377 [info] Discover tests for workspace name: ut - uri: /Users/bruecksen/Sites/ut/unbound_trajectories/core/wagtail_hooks.py
2025-03-07 08:12:16.533 [info] Poetry environment manager found at: /Users/bruecksen/Library/Application Support/pypoetry/venv/bin/poetry
2025-03-07 08:12:16.612 [info] Python interpreter path: ~/.virtualenvs/ut/bin/python
2025-03-07 08:12:47.727 [info] Experiment 'pythonTerminalEnvVarActivation' is inactive
2025-03-07 08:12:47.727 [info] Experiment 'pythonRecommendTensorboardExt' is active
2025-03-07 08:12:47.727 [info] Experiment 'pythonTestAdapter' is active
2025-03-07 08:12:47.727 [info] Native locator: Refresh started
2025-03-07 08:12:47.727 [debug] Testing: Setting up watcher for /Users/bruecksen/Sites/ut
2025-03-07 08:12:47.727 [info] Native locator: Refresh started
2025-03-07 08:12:47.730 [debug] Received shell integration sequence for bash
2025-03-07 08:12:47.738 [debug] Dump environment variables {
"PYTHONPATH": ":",
"DJANGO_SETTINGS": "unbound_trajectories/config/settings.py",
"BASH_SILENCE_DEPRECATION_WARNING": "1",
"COMMAND_MODE": "unix2003",
"DJANGO_READ_DOT_ENV_FILE": "True",
"HOME": "/Users/bruecksen",
"LOGNAME": "bruecksen",
"MallocNanoZone": "0",
"ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
"PWD": "/",
"SHELL": "/bin/bash",
"SHLVL": "1",
"SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.pqIIwPCmCO/Listeners",
"TMPDIR": "/var/folders/bj/hf5sdv3s7lzf1wcq95vw82cc0000gn/T/",
"USER": "bruecksen",
"VIRTUALENVWRAPPER_HOOK_DIR": "/Users/bruecksen/.virtualenvs",
"VIRTUALENVWRAPPER_PROJECT_FILENAME": ".project",
"VIRTUALENVWRAPPER_PYTHON": "/usr/local/bin/python3",
"VIRTUALENVWRAPPER_SCRIPT": "/Library/Frameworks/Python.framework/Versions/3.11/bin/virtualenvwrapper.sh",
"VIRTUALENVWRAPPER_VIRTUALENV": "/Library/Frameworks/Python.framework/Versions/3.11/bin/virtualenv",
"VIRTUALENVWRAPPER_WORKON_CD": "1",
"VSCODE_CODE_CACHE_PATH": "/Users/bruecksen/Library/Application Support/Code/CachedData/e54c774e0add60467559eb0d1e229c6452cf8447",
"VSCODE_CRASH_REPORTER_PROCESS_TYPE": "extensionHost",
"VSCODE_CWD": "/",
"VSCODE_ESM_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_IPC_HOOK": "/Users/bruecksen/Library/Application Support/Code/1.97-main.sock",
"VSCODE_NLS_CONFIG": "{\"userLocale\":\"en\",\"osLocale\":\"de-de\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"/Applications/Visual Studio Code.app/Contents/Resources/app/out/nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}",
"VSCODE_PID": "9968",
"WORKON_HOME": "/Users/bruecksen/.virtualenvs",
"XPC_FLAGS": "0x0",
"XPC_SERVICE_NAME": "application.com.microsoft.VSCode.168532012.168532018",
"_": "/Applications/Visual Studio Code.app/Contents/MacOS/Electron",
"__CFBundleIdentifier": "com.microsoft.VSCode",
"__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x3",
"ELECTRON_RUN_AS_NODE": "1",
"VSCODE_L10N_BUNDLE_LOCATION": "",
"PATH": "/Library/Frameworks/Python.framework/Versions/3.11/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/bruecksen/.local/bin:/usr/local/mysql/bin:/opt/homebrew/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/Cellar/mysql/8.0.12/bin/:usr/local/share/python:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/sbin"
}
2025-03-07 08:12:47.739 [info] > pyenv which python
2025-03-07 08:12:47.739 [info] cwd: .
2025-03-07 08:12:47.750 [debug] [Error: Command failed: pyenv which python
/bin/sh: pyenv: command not found
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at ChildProcess.exithandler (node:child_process:423:12)
at ChildProcess.emit (node:events:530:35)
at maybeClose (node:internal/child_process:1104:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:518:28)
at Pipe.<anonymous> (node:net:343:12)] {
code: 127,
killed: false,
signal: null,
cmd: 'pyenv which python'
}
2025-03-07 08:12:47.754 [debug] Python API env change detected /usr/local/bin/python3 add
2025-03-07 08:12:47.759 [debug] Python API env change detected /usr/local/bin/python3.10 add
2025-03-07 08:12:47.761 [info] Poetry environment manager found at: /Users/bruecksen/Library/Application Support/pypoetry/venv/bin/poetry
2025-03-07 08:12:47.763 [debug] Python API env change detected /Users/bruecksen/.pyenv/versions/mcempirics/bin/python add
2025-03-07 08:12:47.764 [debug] Python API env change detected /Users/bruecksen/.pyenv/versions/3.7.12/bin/python add
2025-03-07 08:12:47.765 [debug] Python API env change detected /usr/local/bin/python3.7 add
2025-03-07 08:12:47.765 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/brueckio/bin/python add
2025-03-07 08:12:47.766 [debug] Python API env change detected /usr/local/bin/python3.8 add
2025-03-07 08:12:47.766 [debug] Python API env change detected /Users/bruecksen/Library/Caches/pypoetry/virtualenvs/unbound-trajectories-wagtail-hQSuZdI_-py3.13/bin/python add
2025-03-07 08:12:47.767 [debug] Python API env change detected /Users/bruecksen/Library/Caches/pypoetry/virtualenvs/unbound-trajectories-wagtail-hQSuZdI_-py3.12/bin/python add
2025-03-07 08:12:47.768 [debug] Python API env change detected /usr/bin/python3 add
2025-03-07 08:12:47.770 [debug] Python API env change detected /usr/local/bin/python3.5 add
2025-03-07 08:12:47.777 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cireg/bin/python add
2025-03-07 08:12:47.790 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/hfbk/bin/python add
2025-03-07 08:12:47.799 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/hfbk2/bin/python add
2025-03-07 08:12:47.799 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/odoo16/bin/python add
2025-03-07 08:12:47.800 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/hfbk39/bin/python add
2025-03-07 08:12:47.800 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/lifelessons/bin/python add
2025-03-07 08:12:47.800 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/meta/bin/python add
2025-03-07 08:12:47.801 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/python=python3.10/bin/python add
2025-03-07 08:12:47.802 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/lifelessons-llm/bin/python add
2025-03-07 08:12:47.802 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/unbound-trajectories-wagtail-hQSuZdI_-py3.13/bin/python add
2025-03-07 08:12:47.803 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/twotrickpony/bin/python add
2025-03-07 08:12:47.804 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/hfbk311/bin/python add
2025-03-07 08:12:47.804 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/isimip2/bin/python add
2025-03-07 08:12:47.804 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/kaluza/bin/python add
2025-03-07 08:12:47.805 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/kfo/bin/python add
2025-03-07 08:12:47.805 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/kaluza2/bin/python add
2025-03-07 08:12:47.805 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/karikatur/bin/python add
2025-03-07 08:12:47.805 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/workshopev/bin/python add
2025-03-07 08:12:47.806 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/wagtail-newsletter/bin/python add
2025-03-07 08:12:47.806 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/test/bin/python add
2025-03-07 08:12:47.809 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/bakeup/bin/python add
2025-03-07 08:12:47.809 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/caspering/bin/python add
2025-03-07 08:12:47.810 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/pumpwerk/bin/python add
2025-03-07 08:12:47.810 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/mcempirics310/bin/python add
2025-03-07 08:12:47.810 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/ut/bin/python add
2025-03-07 08:12:47.812 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/ut/bin/python update
2025-03-07 08:12:47.812 [info] Python interpreter path: ~/.virtualenvs/ut/bin/python
2025-03-07 08:12:47.815 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/wagtail/bin/python add
2025-03-07 08:12:47.816 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/hfbk-master/bin/python add
2025-03-07 08:12:47.816 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/bakerydemo/bin/python add
2025-03-07 08:12:47.817 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/lifelessons-prod/bin/python add
2025-03-07 08:12:47.817 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/lifelessons-clean/bin/python add
2025-03-07 08:12:47.819 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/isimip311/bin/python add
2025-03-07 08:12:47.819 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/python310/bin/python add
2025-03-07 08:12:47.822 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/django-oscar/bin/python add
2025-03-07 08:12:47.823 [debug] Python API env change detected /opt/homebrew/bin/python3.9 add
2025-03-07 08:12:47.823 [debug] Python API env change detected /opt/homebrew/bin/python3.12 add
2025-03-07 08:12:47.824 [debug] Python API env change detected /opt/homebrew/bin/python3.11 add
2025-03-07 08:12:48.430 [debug] Python API env change detected /opt/homebrew/bin/python3 add
2025-03-07 08:12:48.467 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/safetyio/bin/python add
2025-03-07 08:12:48.467 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/safetyio/bin/python3 add
2025-03-07 08:12:48.468 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/safetyio/bin/python3.8 add
2025-03-07 08:12:48.471 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/django-oscar/bin/python3 add
2025-03-07 08:12:48.471 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/django-oscar/bin/python3.8 add
2025-03-07 08:12:48.500 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cruising/bin/python add
2025-03-07 08:12:48.500 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etfapp/bin/python add
2025-03-07 08:12:48.501 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etfapp/bin/python3 add
2025-03-07 08:12:48.501 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etf/bin/python add
2025-03-07 08:12:48.502 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etf/bin/python3 add
2025-03-07 08:12:48.502 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etf/bin/python3.5 add
2025-03-07 08:12:48.502 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/distylerie/bin/python add
2025-03-07 08:12:48.503 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/distylerie/bin/python3 add
2025-03-07 08:12:48.503 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/notifhain/bin/python add
2025-03-07 08:12:48.504 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/tenant/bin/python add
2025-03-07 08:12:48.504 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cireg-gIjHbx-z/bin/python add
2025-03-07 08:12:48.505 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/iw/bin/python add
2025-03-07 08:12:48.505 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cruising/bin/python3 add
2025-03-07 08:12:48.505 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cruising/bin/python3.5 add
2025-03-07 08:12:48.506 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/etfapp/bin/python3.5 add
2025-03-07 08:12:48.506 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/fhp-shop/bin/python add
2025-03-07 08:12:49.181 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/fhp-shop/bin/python3.5 add
2025-03-07 08:12:49.205 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/fhp-shop/bin/python3 add
2025-03-07 08:12:49.242 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/distylerie/bin/python3.5 add
2025-03-07 08:12:49.285 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/notifhain/bin/python3.5 add
2025-03-07 08:12:49.301 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/notifhain/bin/python3 add
2025-03-07 08:12:49.302 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/ra-scrape/bin/python add
2025-03-07 08:12:49.302 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/tenant/bin/python3 add
2025-03-07 08:12:49.302 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/ra-scrape/bin/python3 add
2025-03-07 08:12:49.302 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/ra-scrape/bin/python3.5 add
2025-03-07 08:12:49.305 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/vgh/bin/python add
2025-03-07 08:12:49.309 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cireg-gIjHbx-z/bin/python3 add
2025-03-07 08:12:49.314 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/iw/bin/python3 add
2025-03-07 08:12:49.335 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/iw/bin/python3.5 add
2025-03-07 08:12:49.371 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/tenant/bin/python3.5 add
2025-03-07 08:12:49.380 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/vgh/bin/python3 add
2025-03-07 08:12:49.400 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/vgh/bin/python3.5 add
2025-03-07 08:12:49.404 [debug] Python API env change detected /Users/bruecksen/.virtualenvs/cireg-gIjHbx-z/bin/python3.5 add |
@bruecksen the |
switching to an older pylance version and then back fixed a similar issue i had on mac |
update,when i tried using venv,there was some output > python language server
this happens when i uninstalled python extension and reinstall it,and output > python shows below:
|
update,i delete all related to vscode,including config files and extensions ,all of them ,and reinstall it. Then pylance just works fine.Is there any further info i can provide ? |
@tracerbiubiubiu what exactly did you do to delete everything? Now all my projects are effected and pylance is not starting... My About screen: Version: 1.98.1 (Universal) |
@tracerbiubiubiu i did now the same, removed everything and now it is working again. |
Pylance is not starting in certain projects. In these projects, the Pylance server does not start at all (see attached logs). As a result:
I have tried several troubleshooting steps, including:
I have several older projects where Pylance works as expected, indicating that the issue is project-specific rather than system-wide.
Environment data
Repro Steps
test.py
file and importdjango.models
.Logs
Python Output (Pylance not working)
Python Output (Pylance working)
The text was updated successfully, but these errors were encountered: