Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name '_VSCODE_getVariableInfo' is not defined #10516

Closed
yc1999 opened this issue Jun 21, 2022 · 13 comments · Fixed by #10557
Closed

NameError: name '_VSCODE_getVariableInfo' is not defined #10516

yc1999 opened this issue Jun 21, 2022 · 13 comments · Fixed by #10557
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@yc1999
Copy link

yc1999 commented Jun 21, 2022

I was debugging...

When I chose "view value in data viewer" for a variable at a checkpoint for the first time, it worked fine as normal.

Then I clicked F5, and the programme stopped at the same checkpoint.

But when I chose "view value in data viewer" for a variable again, it didn't work and the log was as follows

error 11:44:25.215: Error: Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name '_VSCODE_getVariableInfo' is not defined

    at o.handleErrorResponse (vscode-file://vscode-app/d:/vscode/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1041:45806)
    at vscode-file://vscode-app/d:/vscode/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1041:45245
warn 11:44:25.215: DataScience Error Error: Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name '_VSCODE_getVariableInfo' is not defined

    at o.handleErrorResponse (vscode-file://vscode-app/d:/vscode/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1041:45806)
    at vscode-file://vscode-app/d:/vscode/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1041:45245
@yc1999 yc1999 added the bug Issue identified by VS Code Team member as probable bug label Jun 21, 2022
@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Jun 21, 2022
@yc1999
Copy link
Author

yc1999 commented Jun 21, 2022

What's more, when my programme first stoped at the checkpoint, the VARIABLES are as follows:
image
But when I clicked F5, and stopped at the checkpoint at scecond time, the VARIABLES are as follows:
image

So, as you can see , a lot of _VSCODE* variables disappeared, it's so wired...

@rchiodo
Copy link
Contributor

rchiodo commented Jun 21, 2022

Thanks for the issue. My guess is that the second breakpoint was a different module and we're not loading the evaluation objects correctly.

Can you describe the two breakpoints more? Or provide repro source? Thanks.

@yc1999
Copy link
Author

yc1999 commented Jun 22, 2022

emmm, the first breakpoint and the second breakpoint is the same. I clicked F5 to stop at the same checkpoint everytime.
image

@sanderdw
Copy link

I have the exact same problem.

@vincentvalton
Copy link

vincentvalton commented Jun 23, 2022

Same problem with either dataframe or tensors. Seems to have popped up during the last vscode update as it used to work fine before.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 51, in _VSCODE_getVariableInfo
NameError: name '_VSCODE_json' is not defined. 
View Jupyter [log](command:jupyter.viewOutput) for further details.

@yc1999
Copy link
Author

yc1999 commented Jun 23, 2022

@rchiodo Hope you can help us address this issue 🙂 It used to work fine before, but in this week, this problem poped up.

@vincentvalton
Copy link

In the meantime as a workaround: I can confirm that regressing to vscode 1.67.2 fixes the issue.

https://code.visualstudio.com/updates/v1_67

@yc1999
Copy link
Author

yc1999 commented Jun 23, 2022

In the meantime as a workaround: I can confirm that regressing to vscode 1.67.2 fixes the issue.

https://code.visualstudio.com/updates/v1_67

oooooh, thank you.
😂Forgive me, I have one more question: If I download version 1.67.2, and install it to replace version 1.68. Will my resources in
the version 1.68 disapper in the version 1.67.2 ? (such as extensions, preferences...) @vincentvalton

@vincentvalton
Copy link

I have both versions installed, and all my preferences are there on both versions.

I had to downgrade the jupyter extension to an earlier version, but once that was done it all worked perfectly 👍 with the v1.67.2 (until the current version is updated and fixed)

@rchiodo
Copy link
Contributor

rchiodo commented Jun 23, 2022

Here's some code to repro the issue:

def foo():
    df.head() # Stick breakpoint here. First time view in data viewer works. Second time it doesn't.

import pandas as pd

df = pd.read_csv('data/test.csv')  

foo()
foo()
foo()

@rchiodo
Copy link
Contributor

rchiodo commented Jun 23, 2022

My guess would be this change:
505dc65

We used to load the script itself as a module. We don't do that because of needing to support web, but then since the code is only loaded once, we never reload for a new stack frame.

@rchiodo
Copy link
Contributor

rchiodo commented Jun 23, 2022

Test should be updated to make sure it causes more than one stack frame.

@rchiodo rchiodo added iteration-candidate and removed triage-needed Issue needs to be triaged labels Jun 23, 2022
@rchiodo rchiodo removed their assignment Jun 23, 2022
@DonJayamanne DonJayamanne added this to the June 2022 milestone Jun 24, 2022
@DonJayamanne DonJayamanne self-assigned this Jun 24, 2022
@rchiodo rchiodo added the verified Verification succeeded label Jun 30, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Jun 30, 2022

/verified

However the removal of the temporary functions doesn't seem to work:

image

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants