microsoft / vscode-data-wrangler

Other
413 stars 16 forks source link

Could not get kernel service error after updating to 1.2.1 #210

Closed Vitorbnc closed 2 months ago

Vitorbnc commented 2 months ago

Environment data

Expected behaviour

Expected variables and data to be shown

Actual behaviour

Error message is shown and can't view data: image

Steps to reproduce:

  1. Updated Data Wrangler to latest version
  2. Open VSCode, run code below.
  3. Try to view data from variable
import pandas as pd
import polars as pl
path_news_folder = '../datasets/stock_news_benzinga/'
news_partners = pl.read_parquet(path_news_folder+'raw_partner_headlines_with_similarity_threshold_80pc.parquet')
news_analysts = pl.read_parquet(path_news_folder+'analyst_ratings_processed_with_similarity_threshold_80pc.parquet')

news_partners = news_partners.rename(mapping={'Max Similarity':'Max Daily Similarity'})
news_analysts = news_analysts.rename(mapping={'Max Similarity':'Max Daily Similarity'})

news_analysts_pd = news_analysts.to_pandas()
news_partners_pd = news_partners.to_pandas()

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

``` 23:13:37.161 [info] Restart requested c:\Projetos\Forecasting\tests\test.ipynb 23:13:37.162 [info] Dispose Kernel process 38716. 23:13:37.170 [info] Process Execution: c:\Windows\System32\taskkill.exe /F /T /PID 38716 23:13:37.178 [info] Process Execution: c:\Python\miniconda3\envs\openbb\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)" 23:13:37.270 [info] Process Execution: c:\Python\miniconda3\envs\openbb\python.exe -m ipykernel_launcher --f=~\AppData\Roaming\jupyter\runtime\kernel-v2-14824AzoWXWTaLYsR.json > cwd: c:\Projetos\Forecasting\tests 23:13:38.302 [warn] StdErr from Kernel Process 0.01s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 23:13:38.303 [warn] StdErr from Kernel Process 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. 23:13:38.719 [info] Restarted 78ae6435-e9dd-499f-961f-bc9dcb34734a 23:13:41.616 [info] Handle Execution of Cells 0 for c:\Projetos\Forecasting\tests\test.ipynb 23:13:41.619 [info] Kernel acknowledged execution of cell 0 @ 1718748821619 23:13:43.968 [info] End cell 0 execution after 2.349s, completed @ 1718748823968, started @ 1718748821619 ```

Vitorbnc commented 2 months ago

Update: last version that works for me is 1.0.2. From 1.2.0 and above it does not work

pwang347 commented 2 months ago

Hi @Vitorbnc, thank you for reporting this issue! I can reproduce this on my end as well using the same version of Data Wrangler and Jupyter that you have installed. This error is happening because the version of Jupyter you have (around 5 months old) is missing a property that we're looking for.

The good news is that you should be able to work around it without changing your Jupyter version by tweaking a setting. Could you please check if you have this setting enabled and if so, could you try unchecking it and trying again on 1.2.1?

image

Please let me know if this works. Thanks!

Vitorbnc commented 2 months ago

Hi @pwang347 thanks a lot for the reply. That solved the problem!