vscode-jupyter: Duplicated intellisense in .ipynb files

Environment data

  • Language Server version: v2022.11.11
  • OS and version: MacOS
  • Jupyter Extension version: v2022.9.1202862440
  • Python Extension version: v2022.18.1
  • Python version: 3.9

Code Snippet

import numpy as np

foo = np.random.rand(5, 2, 4)

print(foo)

Expected behaviour

Show only single intellisense/suggestion/information.

Actual behaviour

Show intellisense/suggestion/information twice. image image

Repro Steps

  1. Create a folder and create a new ipynb file.
  2. Code and point to some tokens or package names.

P.S.

There have been some discussions (https://github.com/microsoft/pylance-release/issues/3027) about this issue and according to @debonte, pylance will not support python.pylanceLspNotebooksEnabled option and remove old notebooks implementation (it seems the option has been removed but the jupyter implementation remains old), I still think this is an abnormal behavior. So how to fix this or use the new notebooks implementation?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 24 (9 by maintainers)

Most upvoted comments

Oh this is fixed in the prerelese version. If you upgrade the Jupyter Extension to

Name: Jupyter Id: ms-toolsai.jupyter Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more. Version: 2022.11.1003131031 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

The problem goes away.

Oh this is fixed in the prerelese version. If you upgrade the Jupyter Extension to

Name: Jupyter Id: ms-toolsai.jupyter Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more. Version: 2022.11.1003131031 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

The problem goes away.

B.t.w. latest pre-release version (v2022.11.1003291043) will not start, but the exact version mentioned by @rchiodo works! And fixes the duplicate symbols issue.

Oh this is fixed in the prerelese version. If you upgrade the Jupyter Extension to Name: Jupyter Id: ms-toolsai.jupyter Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more. Version: 2022.11.1003131031 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter The problem goes away.

B.t.w. latest pre-release version (v2022.11.1003291043) will not start, but the exact version mentioned by @rchiodo works! And fixes the duplicate symbols issue.

I’m also having this problem with that same pre-release version!

Pre-release version v2022.11.1003281132 was also working just fine.

@yibenhuang, @ZupoLlask, I believe you are hitting https://github.com/microsoft/vscode-jupyter/issues/13596. If you disagree, please open a new issue.

@yibenhuang I’m also getting that same behavior…

@debonte Hi, It seems that I am still encountering such a problem. When I have not started the kernel, I only see one suggestion. But after running the cell and entering the same command again, I will see repeated suggestions.

If I haven’t run this cell yet, what I can see is: image

After I ran the cell to import the module, repeated suggestions appeared. image

Reported on: VSCode Version: 1.79.0 Jupyter: v2023.5.1001582324 Pylance: v2023.6.10 Python: v2023.10.0

Hello, experiencing the same problem on my Macbook pro m1 2020 ( Macos Ventura 13.0.1 ) is there any fix yet ?

Try upgrading your Jupyter Extension to pre-release version v2022.11.1003281132

Just to make it as explicit as possible for anyone as daft as me: on the extension page inside vs code, you have to click “Switch to Pre-Release Version”, then click the green down arrow next to “Uninstall”, click “Install Another Version…”, click on v2022.11.1003281132, then finally reload window. It took me forever to find “Install Another Version…”.

I found the same problem. After changing only the python version from 2022.18.1 to 2022.16.1, the duplicate do disappear by now.

Thanks for that! It also works for me.

This is the only solution I’ve found so far that really solves the duplicate intellisence problem.

I found the same problem. After changing only the python version from 2022.18.1 to 2022.16.1, the duplicate do disappear by now.