pylance-release
pylance-release copied to clipboard
DOUBLE language server started in vscode with conda
Environment data
- Language Server version: 2022.7.30
- OS and version: linux x64
- Python version :3.7 in anaconda env named 'scf'
- python.analysis.indexing: null
- python.analysis.typeCheckingMode: basic
Reproduce: just open any python file, then 2 different language servers started
the hint is doubled as well
I find it is the same as #3027
same issue here.
Also having this issue
More information: This bug happens after both .py file and .ipynb notebook are opened. It seems that the pylance server starts for each type of file once, but each server finally acts on both types of files.
edit: It's not the reason. This bug still exists with only .py file. It's just because one server started slower than another, I misdirected by it when I opened the notebook after I opened the .py file.
same issue on windows 11
Had the same issue. The suggestion from https://github.com/microsoft/pylance-release/issues/3027 -> python.pylanceLspNotebooksEnabled: true
seems to have solved it for me.
Had the same issue. The suggestion from https://github.com/microsoft/pylance-release/issues/3027 -> python.pylanceLspNotebooksEnabled: true seems to have solved it for me.
@Fadelis98, do you have python.pylanceLspNotebooksEnabled
set to false
?
Had the same issue. The suggestion from #3027 -> python.pylanceLspNotebooksEnabled: true seems to have solved it for me.
@Fadelis98, do you have
python.pylanceLspNotebooksEnabled
set tofalse
?
No, I set it to true
. In another post you said the default is true
now. Wondering why including pylanceLspNotebooksEnabled
changed anything then, because I did not see this option anywhere before, so it should have been set to true
anyway. You also said the default is depending on the implementation, maybe that's why. However, my setup should be up to date, including extensions. (btw: I'm using conda and Jupyter as well)
I have the same issue but I don't find python.pylanceLspNotebooksEnabled
in my settings.
I added this in a workspace settings.json but that doesnt change anything:
{
"python.pylanceLspNotebooksEnabled": true
}
Additionally, how can I stop a language server?
I have the same issue but I don't find
python.pylanceLspNotebooksEnabled
in my settings. I added this in a workspace settings.json but that doesnt change anything:{ "python.pylanceLspNotebooksEnabled": true }
Additionally, how can I stop a language server?
That's exactly what I did.
Did not try to stop a running one. But you can try "python.languageServer": "None"
as a "hotfix" until a decent solution works for you.
May be related to / dupe of https://github.com/microsoft/vscode-jupyter/issues/11938
An indicator that this problem is caused by the jupyter issue is this shows up in the jupyter output tab:
LSP Notebooks experiment is disabled -- not in treatment group
If you see that, you should switch to the Jupyter prerelease version.
I have discovered that disabling the Pylance extension from within VSCode fixes it. I still get the suggestions from the Language Protocol.
I might be totally wrong, but I think this started after the Python extension was "decoupled" and Pylance and isort became separate ones.
I've tried some of the solutions above, but this bug still exists. My solution is to keep both notebook and python files opened in workplace, and restart vscode, then only one language server started.
@raulguarini, @Fadelis98, have you tried the pre-release version of the Jupyter extension?
@raulguarini, @Fadelis98, have you tried the pre-release version of the Jupyter extension?
Not yet, I'll try it later
I haven’t tried it either. Is there a specific bug fix coming?
On Thu, Nov 17, 2022 at 10:46 PM Fadelis98 @.***> wrote:
@raulguarini https://github.com/raulguarini, @Fadelis98 https://github.com/Fadelis98, have you tried the pre-release version of the Jupyter extension?
Not yet, I'll try it later
— Reply to this email directly, view it on GitHub https://github.com/microsoft/pylance-release/issues/3042#issuecomment-1319537015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6IBF34ARFWJARHC3ZBWIDWI4CZJANCNFSM53RQIN4A . You are receiving this because you were mentioned.Message ID: @.***>
There was an issue with similar behavior that was fixed in the Jupyter extension recently. Please try their latest pre-release build and see if that fixes this for you.
I'm also hitting this error. I tried the jupyter pre-release build and it's entirely broken for me: (edit: likely from https://github.com/microsoft/vscode-jupyter/issues/12200#issuecomment-1330937961)
[Extension Host] extension activation failed TypeError: s.notebooks.createNotebookControllerDetectionTask is not a function
at h.startRefreshWithPython (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:2070921)
at h.activate (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:2069968)
at /Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:17:163983
at Array.map (<anonymous>)
at c.activateSync (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:17:163973)
at /Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:1576749
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
I'm also hitting this error. I tried the jupyter pre-release build and it's entirely broken for me: (edit: likely from microsoft/vscode-jupyter#12200 (comment))
[Extension Host] extension activation failed TypeError: s.notebooks.createNotebookControllerDetectionTask is not a function at h.startRefreshWithPython (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:2070921) at h.activate (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:2069968) at /Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:17:163983 at Array.map (<anonymous>) at c.activateSync (/Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:17:163973) at /Users/kyle/.vscode/extensions/ms-toolsai.jupyter-2022.11.1003301027/out/extension.node.js:2:1576749 at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
Jupyter prelease extension requires VS code insiders at the moment (at least until VS code stable catches up to it). It's using APIs that don't exist in the stable version of VS code.
I was able to update to 1.74.0 (released today?) which fixed it without switching to the insiders build