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

jupyter does not provide correct completion suggestions #10159

Closed
Micro-sheep opened this issue May 27, 2022 · 12 comments
Closed

jupyter does not provide correct completion suggestions #10159

Micro-sheep opened this issue May 27, 2022 · 12 comments
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language

Comments

@Micro-sheep
Copy link

Environment data

  • VS Code version: 1.67.2
  • Jupyter Extension version (available under the Extensions sidebar): v2022.4.1021342353
  • Python Extension version (available under the Extensions sidebar): v2022.6.2
  • OS (Windows | Mac | Linux distro) and version: Windows 11
  • Python and/or Anaconda version: 3.7.9
  • Type of virtual environment used: NA
  • Jupyter server running: Local

Expected behaviour

When typing as in .ipynb file, there should not be any suggestion just like typing in .py file .

expected

Actual behaviour

When typing as in .ipynb file, the icon for as is wrong and there are completion suggestions

actual

Steps to reproduce:

  1. Open a .ipynb file in vscode
  2. Type import requests as r in python cell
@Micro-sheep Micro-sheep added the bug Issue identified by VS Code Team member as probable bug label May 27, 2022
@github-actions github-actions bot added the triage-needed Issue needs to be triaged label May 27, 2022
@amunger
Copy link
Contributor

amunger commented May 27, 2022

thanks for the bug. To repro, I had to run a cell first to start the kernel. Still happens in the latest insiders

@amunger amunger added the notebook-intellisense Intellisense & other language features in notebook cells for any language label May 27, 2022
@rchiodo
Copy link
Contributor

rchiodo commented May 27, 2022

Oh this is the jupyter kernel completions. It's not smart enough to parse that so it just returns everything.

I imagine if this setting was turned on, it might work:

image

@Micro-sheep
Copy link
Author

Oh this is the jupyter kernel completions. It's not smart enough to parse that so it just returns everything.

I imagine if this setting was turned on, it might work:

image

I can't find this setting in both latest stable and pre-release version. However, this setting exists in the latest source code on Github. Should I compile it from the source code and install? Or is there another way to set environment variable VSC_JUPYTER_IntellisenseTimeout to make it work which you memtion in #7925 (comment).
I notice that this option was removed in the latest version.

@rchiodo
Copy link
Contributor

rchiodo commented May 27, 2022

Sorry there's no way to disable jupyter completions at the moment. The latest prerelease version should have this setting though:

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

@Micro-sheep
Copy link
Author

Sorry there's no way to disable jupyter completions at the moment. The latest prerelease version should have this setting though:

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

Thank you very much, it works for me!

@rchiodo
Copy link
Contributor

rchiodo commented May 28, 2022

Sorry there's no way to disable jupyter completions at the moment. The latest prerelease version should have this setting though:
This is the latest version: Name: Jupyter Id: ms-toolsai.jupyter Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more. Version: 2022.5.1001491011 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

Thank you very much, it works for me!

If you notice any slowdowns when executing, you might have to disable that setting. It tells the kernel to use Jedi for completions, but Jedi has performance issues.

@Micro-sheep
Copy link
Author

Sorry there's no way to disable jupyter completions at the moment. The latest prerelease version should have this setting though:
This is the latest version: Name: Jupyter Id: ms-toolsai.jupyter Description: Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more. Version: 2022.5.1001491011 Publisher: Microsoft VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

Thank you very much, it works for me!

If you notice any slowdowns when executing, you might have to disable that setting. It tells the kernel to use Jedi for completions, but Jedi has performance issues.

When this setting is enabled, a new problem pops up.

image

@rchiodo
Copy link
Contributor

rchiodo commented May 31, 2022

That's on purpose. Jupyter returns all magics and file names when quoting something.

@greazer greazer removed the triage-needed Issue needs to be triaged label Jun 2, 2022
@greazer
Copy link
Member

greazer commented Jun 2, 2022

Perhaps consider adding a setting to disable jupyter completions.

@DonJayamanne
Copy link
Contributor

@Micro-sheep
I believe we have fixed this in the latest release bits
Please could you install vscode 1.74 and the latest versions of the Jupyter, Python and Pylance extensions

I've tested this at my end and this works as expected.

If this still doesn't work, please do ping here and i'll reopen this issue or please feel free to create a new issue

@Micro-sheep
Copy link
Author

@Micro-sheep I believe we have fixed this in the latest release bits Please could you install vscode 1.74 and the latest versions of the Jupyter, Python and Pylance extensions

I've tested this at my end and this works as expected.

If this still doesn't work, please do ping here and i'll reopen this issue or please feel free to create a new issue

I have installed the latest version of the three extensions you mentioned, but it still does not work as expected when typing in jupyter.

Note: it works as expected when starting jupyter, but after I run a cell, it won't work as expected anymore.

Env

  • vscode version: v1.74.0
  • python extension version: v2022.20.0
  • pylance extension version: v2022.12.20
  • jupyter extension version: v2022.11.1003412109

Actual behaviour

screenshot

@DonJayamanne DonJayamanne reopened this Dec 9, 2022
@DonJayamanne
Copy link
Contributor

Duplicate of #12029

@DonJayamanne DonJayamanne marked this as a duplicate of #12029 Dec 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-intellisense Intellisense & other language features in notebook cells for any language
Projects
None yet
Development

No branches or pull requests

6 participants