Skip to content
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

Duplicated intellisense in .ipynb files #11938

Closed
alanyoungCN opened this issue Nov 4, 2022 · 24 comments
Closed

Duplicated intellisense in .ipynb files #11938

alanyoungCN opened this issue Nov 4, 2022 · 24 comments
Assignees
Labels
triage-needed Issue needs to be triaged

Comments

@alanyoungCN
Copy link

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 (microsoft/pylance-release#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?

@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Nov 4, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 4, 2022

Thanks for the issue.

Can you post your log as described here: https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

If you have the latest Jupyter/Python/Pylance combination, this shouldn't happen.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 4, 2022

Your user settings.json would be good to see too. I don't think the old settings should interfere with newer bits, but they might be.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 4, 2022

This is what I get:

image

And my extension versions are:

ms-toolsai.jupyter - 2022.9.1202862440
ms-python.vscode-pylance - 2022.11.10
ms-python.python- 2022.16.1

@YeshuoShu
Copy link

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.

@thomjiji
Copy link

thomjiji commented Nov 5, 2022

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.

@alanyoungCN
Copy link
Author

alanyoungCN commented Nov 6, 2022

Thanks for the issue.

Can you post your log as described here: https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

If you have the latest Jupyter/Python/Pylance combination, this shouldn't happen.

@rchiodo. Sorry for the late reply. The log is really long so I created a gist: https://gist.github.com/alanyoungCN/eb1a02404abc9235ae208c358a9bd3a1.
My settings.json has no special settings for Python, Jupyter and Pylance, which I have checked.

Also, according to the comments before, Your Python extension (2022.16.1) seems old and the newest version is 2022.18.1. This may be the key to this issue.

@CatNofishing
Copy link

@rchiodo
same problem in py file.
image

@rchiodo
Copy link
Contributor

rchiodo commented Nov 7, 2022

Looks like something broke in the jupyter extension. It's attempting to provide intellisense at the same time as pylance. I can repro with the newer version.

@rchiodo rchiodo transferred this issue from microsoft/pylance-release Nov 7, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 7, 2022

My guess here is that this is actually in the python extension. That the python extension is saying to jupyter that it should use the concat language server.

However, I'm wondering if the jupyter extension ever needs to have a language server anymore? Can we just remove it? Or maybe just have it available when pylance isn't in use?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 7, 2022

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.

@SjoerdV
Copy link

SjoerdV commented Nov 23, 2022

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.

@ZupoLlask
Copy link

ZupoLlask commented Nov 23, 2022

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.

@amunger
Copy link
Contributor

amunger commented Nov 28, 2022

@SjoerdV or @ZupoLlask - could you open a new issue with some further details if pre-release is still not working for you?
Either with the logs from Jupyter: show output or any error messages in the developer tools: Developer: toggle developer tools

@cameron-chen
Copy link

@SjoerdV or @ZupoLlask - could you open a new issue with some further details if pre-release is still not working for you? Either with the logs from Jupyter: show output or any error messages in the developer tools: Developer: toggle developer tools

Hello @amunger , can you take a look? I open a new issue for the problem.

#12200 (comment)

@wissambenhaddad
Copy link

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

@Slope86
Copy link

Slope86 commented Nov 30, 2022

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

@maxbane
Copy link

maxbane commented Nov 30, 2022

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...".

@vbuxbaum
Copy link

vbuxbaum commented Dec 1, 2022

Hi everyone!

Changing to pre-release version also worked for me in version v2022.11.1003301027

@GladioFeng
Copy link

I have the same problem

@debonte
Copy link
Contributor

debonte commented Dec 5, 2022

@GladioFeng
Copy link

@GladioFeng, see microsoft/pylance-release#3693 (comment)

thanks I have solved the problem by update jupyter extension to v2022.11.1003412109

@yibenhuang
Copy link

@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

@ZupoLlask
Copy link

@yibenhuang I'm also getting that same behavior...

@debonte
Copy link
Contributor

debonte commented Jun 9, 2023

@yibenhuang, @ZupoLlask, I believe you are hitting #13596. If you disagree, please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests