Vscode-jupyter: Autocompletion not working Jedi/Pylance+Notebook editor preview

Created on 11 Jul 2020  路  10Comments  路  Source: microsoft/vscode-jupyter

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

1.Right click on a notebook file
2.Choose Open with preview Notebook editor
3.Import OS module

  1. os. doesn't display the list of available methods

Actual behavior no method/attribute is displayed

Expected behavior displaying the list of available methods/attributes

Your Jupyter and/or Python environment

_Please provide as much info as you readily know_

  • Jupyter server running: Remote
  • Extension version: v2020.8.93699-dev
  • VS Code version: 1.47
  • Setting python.jediEnabled: false
  • Setting python.languageServer: Pylance
  • Python and/or Anaconda version: 3.7.7
  • OS: Ubuntu through WSL2
  • Virtual environment: conda

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

bug

Most helpful comment

Yes, that's exactly the behavior that I get. Thank you very much for the explanation, it kept bugging me lol.

All 10 comments

Thanks for the issue @Silfalion, we've added it to our Backlog.

Sure! thank you. Any idea when the new notebook will be available?

It will be on insiders this Wednesday.

That's awesome news:D have been waiting for it for so long, thank you!

Pinpointed the issue a little more, the autocompletion and detectin of packages works fine when the import statement are in the same cell as the call. If you try to do an autocomplete from another cell though it doesn't recognize the package you're trying to access, but executes just fine.

Is there a plan to add it in the future future? the issue is still recurrent.

Yes at some point we will have full parity (and more) with the new notebook editor. It's a work in progress and will likely take many months.

Hm I see. Do you know if there are other users who had this problem?

Yes. Intellisense is not supposed to work for the Notebook editor preview yet.

The crux of the problem is that our language server has to be changed to understand notebooks. Right now each individual cell in a notebook is treated as a separate document by the language server. This doesn't really work. Example:

``` Cell 1
x = 4


``` Cell 2
print(x)

Obviously if both are 'separate' files, X will not be defined in the second cell.

Yes, that's exactly the behavior that I get. Thank you very much for the explanation, it kept bugging me lol.

Was this page helpful?
0 / 5 - 0 ratings