From 3d97e2520b05b5d8e4d58f4f784813e8781b8dc4 Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Wed, 12 Feb 2020 10:15:17 -0800 Subject: [PATCH] Eliminate variable value when computing data frame info --- news/2 Fixes/10075.md | 1 + src/client/datascience/jupyter/jupyterVariables.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 news/2 Fixes/10075.md diff --git a/news/2 Fixes/10075.md b/news/2 Fixes/10075.md new file mode 100644 index 000000000000..1b4d7f29dbbf --- /dev/null +++ b/news/2 Fixes/10075.md @@ -0,0 +1 @@ +Fix data viewer not opening on certain data frames. \ No newline at end of file diff --git a/src/client/datascience/jupyter/jupyterVariables.ts b/src/client/datascience/jupyter/jupyterVariables.ts index 057e88c83bbc..ce3b925e8747 100644 --- a/src/client/datascience/jupyter/jupyterVariables.ts +++ b/src/client/datascience/jupyter/jupyterVariables.ts @@ -120,8 +120,9 @@ export class JupyterVariables implements IJupyterVariables { return defaultValue; } - // Prep our targetVariable to send over - const variableString = JSON.stringify(targetVariable).replace(/\\n/g, '\\\\n'); + // Prep our targetVariable to send over. Remove the 'value' as it's not necessary for getting df info and can have invalid data in it + const pruned = { ...targetVariable, value: '' }; + const variableString = JSON.stringify(pruned); // Setup a regex const regexPattern =