We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d84b3de + 649433d commit 21d28f9Copy full SHA for 21d28f9
2 files changed
news/2 Fixes/5420.md
@@ -0,0 +1 @@
1
+Fix error with bad len() values in variable explorer
pythonFiles/datascience/getJupyterVariableValue.py
@@ -9,10 +9,16 @@
9
10
# Find shape and count if available
11
if (hasattr(_VSCODE_evalResult, 'shape')):
12
- _VSCODE_targetVariable['shape'] = str(_VSCODE_evalResult.shape)
+ try:
13
+ _VSCODE_targetVariable['shape'] = str(_VSCODE_evalResult.shape)
14
+ except TypeError:
15
+ pass
16
17
if (hasattr(_VSCODE_evalResult, '__len__')):
- _VSCODE_targetVariable['count'] = len(_VSCODE_evalResult)
18
19
+ _VSCODE_targetVariable['count'] = len(_VSCODE_evalResult)
20
21
22
23
# Get the string of the eval result, truncate it as it could be far too long
24
_VSCODE_targetValue = str(_VSCODE_evalResult)
0 commit comments