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

Language Server reports false positives in Native Notebook #4718

Closed
DonJayamanne opened this issue Feb 9, 2021 · 1 comment
Closed

Language Server reports false positives in Native Notebook #4718

DonJayamanne opened this issue Feb 9, 2021 · 1 comment
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

@DonJayamanne
Copy link
Contributor

  • Install VSCode Insiders
  • Install Jupyter Extension
  • Install Pylance
  • Select Python 3.6 as workspace interpreter
  • Select a different interrpeter as Kernel in Notebook (e.g. Python 3.7 Conda)
  • Install pandas into the kernel interpreter
  • Write code in cell and import pandas

Pylance will report errors about missing packages (pandas is reported as not being installed).
This is a false positive, the user has it installed in the python environment used by the kernel.

The problem is pylance doesn't know that the document is using a different interpreter.

This will eventually get even more complicated:

  • Assume we import a python module from the notebook
  • I now go to deffinition & land in the python file
  • Now what Interpreter should the langauge server use when checking pacakges/imports for this file?
    Basically it depends on the context, but does the LS know this?
@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Feb 9, 2021
@DonJayamanne DonJayamanne changed the title Language Server reports false positives in Native Notebook Language Server reports false positives in Native Notebook and Interactive Window May 10, 2021
@DonJayamanne DonJayamanne changed the title Language Server reports false positives in Native Notebook and Interactive Window Language Server reports false positives in Native Notebook May 10, 2021
@greazer greazer added the notebook-intellisense Intellisense & other language features in notebook cells for any language label Aug 2, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Aug 31, 2021

Dupe of #6333

@rchiodo rchiodo closed this as completed Aug 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2021
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

3 participants