Azuredatastudio: Notebooks with Python : unable to get code intellisense

Created on 6 Feb 2020  路  9Comments  路  Source: microsoft/azuredatastudio

Azure data studio with python, code IntelliSense not working code. This is a huge problem at this point. Attached screenshots are for VS code, Jupyter notebook, and Azure notebook

vs code is working:
image

Jupyter notebook is working
image

Azure notebook is not working:
image

Reproduce the issue:

  • import following,
    %matplotlib inline
    import pandas as pd
    import matplotlib.pyplot as plt
  • type
    df.plot.

  • type the dot, user unable to see the code IntelliSense

Note:
Code IntelliSense can be seen with notebook with SQL queries.

Area - Notebooks Bug Done Postponed

Most helpful comment

@lucyzhang929 you're working in this area. Can you look into this? I know we've made some changes recently but definitely want to get to the bottom of this.

All 9 comments

Hi @EricTechcert sorry to hear that you're having an issue.

I wasn't quite able to reproduce your issue:
image

After you type in "df.plot.", if you press ctrl+space, does the list populate correctly, or is it empty, out of curiosity?

Not getting correct IntelliSense in azure data studio. I have added sample code to try out in vs code and Azure data studio or even Jupyter notebook. Additionally added screenshots to describe the issue.

Azure Data Studio: According to below screenshot, when we enter 'dot' We did not get anything,
image

After press ctrl+space, and those IntelliSense are incorrect
image

compare with the above screenshot, I will enter some other value to code cell. check the value IntelliSense is provided and those are incorrect. (I assume whatever we type in code cell, its provide)
image

This is we get from vs code even without press ctrl+Space. (After entering the plot[.])
this is the correct IntelliSense what we expected.
image

Sample code to reproduce.
Enter the below code in vs code and Azure data studio and check the IntelliSense.

_Code sample:_

%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt

grades = pd.DataFrame([[6,4,5], [7,8,8], [6,7,5], [6,5,7], [5,2,6]],
index=['Mary', 'John', 'Ann', 'Pete', 'Laura',],
columns = ['test_1', 'test_2', 'test_3'])

grades

grades.

VS Code with proper IntelliSense:
image

Azure Data Studio with same code sample with Ctrl+space. This not what expected.
image

I am experiencing the same problem with Python. If you look at the screenshots, you can see that the suggestions are actually just words picked up from the immediate context above within the same code cell. So not sure if that's a helpful observation, maybe there are multiple modes for the IntelliSense?

Interestingly, I noticed the same problem with an SQL-Kernel notebook earlier today, but in that one it is now back to functioning the expected way again.

Hi,
This problem still not resolved ?
best regards,

@lucyzhang929 you're working in this area. Can you look into this? I know we've made some changes recently but definitely want to get to the bottom of this.

Hi @EricTechcert @RolandASc @abourassi,

Using the sample code @EricTechcert gave above, I see the same Intellisense suggestions on the latest version of Azure Data Studio (1.25.1) as VSCode after pressing ctrl+space.

Azure Data Studio:
ADS
VSCode:
VSCode

Can someone confirm that they are also seeing the same suggestions after pressing ctrl+space?

I will investigate why the suggestions are not showing up without pressing ctrl+space.

Thanks for investigating @lucyzhang929.

I have upgraded Azure Data Studio (1.25.1) and tried the same code snippet in a notebook cell, but unfortunately still have the same problem (i.e. wrong context suggestions after pressing ctrl + space.

Fwiw, I am using the "Python 3" kernel and pointing to my own pre-existing Python installation (Miniconda). Under "Settings", Editor > Suggest: all the various boxes are ticked.

However, I have also tried to create a new notebook, pasted in the code snippet, and it was working fine for a moment. Once I saved the notebook (extension .ipynb), it has again stopped working though.

@RolandASc, are the wrong context suggestions you are seeing the same as the one @EricTechcert posted above (grades. example)? I am seeing the same "wrong" suggestions list when I am using the SQL Kernel:

Screen Shot 2020-12-15 at 9 41 31 AM

I wonder if this has something to do with the kernels not switching completely from SQL to Python 3.

Hi,
In my case, it work if new notebook, but python IntelliSense not working in an existing noteook.
Regards,

Was this page helpful?
0 / 5 - 0 ratings