vscode-jupyter
vscode-jupyter copied to clipboard
Intellisense completions have duplicates when `python.pylanceLspNotebooksEnabled` is true
Repro steps:
- Set "python.pylanceLspNotebooksEnabled" to true
- Create a notebook
- Create some cells that create a dataframe
- Run the cell that creates the dataframe
- Create a new cell to get members.
- Type
df.ag
Result:

Without python.pylanceLspNotebooksEnabled:

The root cause of this problem is the Jupyter extension is no longer creating the pylance server so we have no current way to query pylance for its list of completions to eliminate duplicates.
/cc @debonte
For me instead the duplicates appear in normal .py files once I open and run a Jupyter notebook, and with the folllowing settings:
"python.pylanceLspNotebooksEnabled": false, "jupyter.pylanceHandlesNotebooks": true,
Setting python.pylanceLspNotebooksEnabled to true instead isn't an option currently due to the issue https://github.com/microsoft/pylance-release/issues/3126, but putting both to false,
"python.pylanceLspNotebooksEnabled": false, "jupyter.pylanceHandlesNotebooks": false,
gets rid of duplicates in both .py and .ipynb files for me and makes things acceptable.
This is probably the same issue as #10846
Just an update to confirm that I still see this issue in VSCode v1.71.2 + Pylance v.2022.9.21, see https://github.com/microsoft/pylance-release/issues/3017#issuecomment-1248097940
I am seeing duplicate intellisense as well for:
ms-python.vscode-pylance 2022.11.10
ms-toolsai.jupyter v2022.9.1202862440
VSCode
Version: 1.73.0 (user setup)
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-01T15:34:06.111Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
According to https://github.com/microsoft/pylance-release/issues/3017#issuecomment-1254365264, the python.pylanceLspNotebooksEnabled setting is going away, and as of the 1.73.0 2022-11-01T15:34:06.111Z version, it seems to be gone.
This is essentially forcing "python.pylanceLspNotebooksEnabled": true however I was still able to make "jupyter.pylanceHandlesNotebooks": false
With these settings, my .py files don't duplicate intellisense, but my .ipynb files do duplicate intellisense.
@m-metz According to https://github.com/microsoft/vscode-jupyter/issues/11938#issuecomment-1306103766 this seems fixed in the pre-release version of the Jupyter extension. Switching to that one indeed fixed it for me.
@m-metz According to #11938 (comment) this seems fixed in the pre-release version of the Jupyter extension. Switching to that one indeed fixed it for me.
It seems that also fixed the same issue for me!
I am seeing duplicate intellisense as well for:
ms-python.vscode-pylance 2022.11.10 ms-toolsai.jupyter v2022.9.1202862440 VSCode Version: 1.73.0 (user setup) Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f Date: 2022-11-01T15:34:06.111Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.22621 Sandboxed: NoAccording to microsoft/pylance-release#3017 (comment), the
python.pylanceLspNotebooksEnabledsetting is going away, and as of the1.73.02022-11-01T15:34:06.111Zversion, it seems to be gone.This is essentially forcing
"python.pylanceLspNotebooksEnabled": truehowever I was still able to make"jupyter.pylanceHandlesNotebooks": falseWith these settings, my
.pyfiles don't duplicate intellisense, but my.ipynbfiles do duplicate intellisense.
where does one make this change ?
@dlefcoe Please could you install VS Codde 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists. From what I know this should now be fixed.
@DonJayamanne This appears to be fixed.
VS Codde 1.74 and the latest Jupyter, PyLance and Python extension works !
@dlefcoe Please could you install VS Codde 1.74 and the latest Jupyter, PyLance and Python extension and confirm this still exists. From what I know this should now be fixed.
this appears to work on windows 10, but not windows 11 (same updates done).
this appears to work on windows 10, but not windows 11 (same updates done).
The issue disappeared for me after the latest pylance or jupyter update on Win11, it works fine now
this appears to work on windows 10, but not windows 11 (same updates done).
The issue disappeared for me after the latest pylance or jupyter update on Win11, it works fine now
Yes, it does:
- With
windows 10i just needed to check for updates invscodeand restart. - With
windows 11i needed to restart the operating system to invoke thevscodeupdate.