Closed darynwhite closed 10 months ago
I am having the same issue.
Rolling back to version 2023.10.40
fixes it
@darynwhite, @DmitryKharitonov, can either of you reproduce this in a public repo or code that can be shared, perhaps privately?
If not, I'm curious what you have python.analysis.extraPaths
set to. That might give me a clue.
@debonte - I want to help but I just don't know where this setting should be.
I created another repo with a test project, but Pylance seems to be working there just fine. This is my current repo - see if it helps: public repo
This is settings.json:
{
"git.enableSmartCommit": true,
"explorer.confirmDelete": false,
"python.pythonPath": "/usr/bin/python3",
"git.autofetch": true,
"npm.keybindingsChangedWarningShown": true,
"notebook.output.textLineLimit": 50,
"[python]": {
"editor.formatOnType": true
},
"notebook.lineNumbers": "on",
"git.confirmSync": false,
"codegpt.apiKey": "sxxx",
"codegpt.model": "ChatGPT",
"CodeGPT.organizationId": "xxx",
"CodeGPT.windowMemory": 10,
"python.analysis.diagnosticSeverityOverrides": {},
"python.autoComplete.extraPaths": [],
"python.analysis.extraPaths": []
}
Also, copied 2 additional lines above the error to add more colour in hope it would be helpful to investigate. Scroll to the right until you see character "^"
2023-10-28 09:25:03.292 [info]
2023-10-28 09:25:03.294 [info] ^
Error: [UriError]: Scheme contains illegal characters.
at l (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/vendor.bundle.js:2:1628554)
at t (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/vendor.bundle.js:2:1629490)
at new t (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/vendor.bundle.js:2:1631082)
at Function.t.parse (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/vendor.bundle.js:2:1630385)
at v (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1097933)
at w (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1099765)
at A (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1099824)
at o.processPartialStubPackages (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1477412)
at _0x4db351.processPartialStubPackages (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/server.bundle.js:1:340620)
at _0xa6e677.ensurePartialStubPackages (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:293366)
at _0x39eed6._ensurePartialStubPackages (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:8537)
at /Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:5290
at Array.forEach (<anonymous>)
at _0x39eed6.setImportResolver (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:5273)
at k._applyConfigOptions (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:488754)
at k.setOptions (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:466191)
at Function.runWithOptions (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1163681)
at _0x5e13d0.updateOptionsAndRestartService (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1141163)
at _0x5e13d0.updateSettingsForWorkspace (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/pyright.bundle.js:1:1140930)
at _0x5e13d0.updateSettingsForWorkspace (/Users/dmitriikharitonov/.vscode/extensions/ms-python.vscode-pylance-2023.10.50/dist/server.bundle.js:1:1018272)
at async Promise.all (index 0)
2023-10-28 09:25:03.353 [info] [Error - 09:25:03] Server process exited with code 1.
2023-10-28 09:25:03.359 [info] [Error - 09:25:03] The Pylance server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Am having the same issue as well. I didn't do anything special. For me, on Neovim
@DmitryKharitonov, thanks for sharing your repo! I was able to reproduce the crash. It's a bug in our URI-related logic. Your repo contains a directory named Supervised Machine Learning: Regression and Classification
and we're incorrectly assuming that because it contains a :
it is a URI. We then attempt to parse it as a URI which causes the exception.
We'll prioritize fixing this, but in the meantime you should be able to work around the crash by removing the :
from this directory name.
@darynwhite, @BozeBro, when you see this crash are you also opening workspaces containing directories whose names contain a :
character?
Repro:
Supervised Machine Learning: Regression and Classification
... can either of you reproduce this in a public repo or code that can be shared, perhaps privately?
I was able to reproduce it with this repo: darynwhite/wagtail-feedstock
If not, I'm curious what you have
python.analysis.extraPaths
set to. That might give me a clue.
I have no extra paths set, and have disabled and re-enabled all custom settings a few times.
when you see this crash are you also opening workspaces containing directories whose names contain a
:
character?
I have no directories or filenames containing the :
character, but there are -
and _
if they could be causing a problem?
@darynwhite, I'm unable to reproduce the crash with your repo. The UI detection problem that I found is specific to the :
character. My best guess is that there's a :
in one of the directory names in your venv or global environment.
Thanks @debonte, I'll look for :
specifically.
Rolling back to version
2023.10.40
fixes it
it's work!
This issue has been fixed in prerelease version 2023.11.11, which we've just released. You can find the changelog here: CHANGELOG.md
Environment data
Code Snippet
See log file below.
Here are the last lines:
Repro Steps
This is happening on startup, no matter how I start up.
To answer the questions from #5009:
Logs
Python Language Server.log