Data viewer crashes when inspecting jupyter data frame variable
See original GitHub issueApplies To
- Notebooks (.ipynb files)
- Interactive Window and/or Cell Scripts (.py files with #%% markers)
What happened?
Data viewer crashes on any spark data frame variable, regardless of whether it contains data or was created out of an empty list. I use databricks-connect 9.1.13 for spark.
Does not apply to
- normal .py files (without # %% markers)
- spark data frames, that have been converted to pandas data frames
- my other windows machine (this is a mac)
Urls and pathes have been anonymized
VS Code Version
1.66.2
Jupyter Extension Version
v2022.3.1000901801
Jupyter logs
Info 14:46:55: Kernel Output: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
To read more about this, see https://github.com/ipython/ipython/issues/2049
To connect another client to this kernel, use:
--existing /var/folders/lt/gnj5lvrn7f926knh9ltmyhhc0000gn/T/tmp-18075p906p9AwDRD1.json
View job details at https://westeurope.azuredatabricks.net/?o=xxx#/setting/clusters/xxx-xxx-xxx/sparkUi
View job details at https://westeurope.azuredatabricks.net/?o=xxx#/setting/clusters/xxx-xxx-xxx/sparkUi
View job details at https://westeurope.azuredatabricks.net/?o=xxx#/setting/clusters/xxx-xxx-xxx/sparkUi
View job details at https://westeurope.azuredatabricks.net/?o=xxx#/setting/clusters/xxx-xxx-xxx/sparkUi
View job details at https://westeurope.azuredatabricks.net/?o=xxx#/setting/clusters/xxx-xxx-xxx/sparkUi
Info 14:46:55: Executing silently Code (completed) = import builtins\nbuiltins.print(_VSCODE_getDataFrameInfo(df))
Error 14:46:55: [SyntaxError: Unexpected token V in JSON at position 0
at JSON.parse (<anonymous>)
at g.deserializeJupyterResult (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:576269)
at getDataFrameInfo (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:572372)
at async r.ensureInitialized (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:963574)
at async r.getDataFrameInfo (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:962377)
at async x.prepDataFrameInfo (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:953270)
at async x.showData (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:951044)
at async f.create (/Users/xxx/.vscode/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:960055)]
Info 14:46:55: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 14:46:55: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 14:46:55: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 14:46:55: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 14:46:55: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 14:46:55: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Coding Language and Runtime Version
Python v3.8.10
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Jupyter Lab freezes the computer when out of RAM
The best way to work with big data is to create a new data frame that takes only small portion or a small...
Read more >How to avoid a Pandas pandemonium, Part I | by Pamela Wu
The best way to avoid this problem is to make a new DataFrame with a new variable name when you're starting a cell...
Read more >How to Show All Columns and Rows in a Pandas DataFrame
This guide explains how to display all columns and rows of a Pandas DataFrame using options parameters.
Read more >Python Data Analysis with Pandas and Matplotlib - Coding Club
Learn how to filter data in a Pandas DataFrame; Learn how to read and sort data from a file; Understand the basics of...
Read more >Data Consolidation & Transformation With Python | Tutorial
How to Use Python and Pandas for Data Consolidation and Transformation ... Splitting columns and inspecting the DataFrame with .head().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@DonJayamanne Works for me 😃 Tested with … VS Code 1.74.0-insider Python v2022.19.13351014 Pre-Release Jupyter v2023.1.1003411034 Pre-Release
Thank you!