-
Notifications
You must be signed in to change notification settings - Fork 293
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
Variable references are lost. #14073
Comments
I can't seem to repro this. Where are the references not showing that you would expect? Can you provide the specific repro steps to trigger this issue? Do you have something set for |
Try the following steps:
Create a new jupyter notebook in VSCode.
Add in the first cell a variable.
Then add about 20 cells after the first cell.
In the last cell change the value of the variable declared in the first
cell.
Delete the penultimate cell in the notebook.
When viewing the data in the first cell, you will notice that the variable
declared at the beginning no longer has a reference (it has lost its color
and cannot find the definition).
…On Mon, Aug 7, 2023, 12:43 PM Aaron Munger ***@***.***> wrote:
I can't seem to repro this. Where are the references not showing that you
would expect? Can you provide the specific repro steps to trigger this
issue? Do you have something set for python.languageServer?
—
Reply to this email directly, view it on GitHub
<#14073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOKAFYBAKA7FEKJNWTHSA3XUESMRANCNFSM6AAAAAA3HHJQQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
A little trick to make it work:
In the configurations if you put: "python.languageServer" : "Microsoft" the
problem is solved. but another problem occurs.
Value is not accepted. Valid values: "Default", "Jedi", "Pylance", "None".
…On Mon, Aug 7, 2023, 12:43 PM Aaron Munger ***@***.***> wrote:
I can't seem to repro this. Where are the references not showing that you
would expect? Can you provide the specific repro steps to trigger this
issue? Do you have something set for python.languageServer?
—
Reply to this email directly, view it on GitHub
<#14073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOKAFYBAKA7FEKJNWTHSA3XUESMRANCNFSM6AAAAAA3HHJQQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm still not seeing it. Did you have something set for the language server before changing it to 'Microsoft', or does it repro when you use the default? |
What would be the proper value to set the variable "python.languageServer"?
…On Mon, Aug 7, 2023, 12:43 PM Aaron Munger ***@***.***> wrote:
I can't seem to repro this. Where are the references not showing that you
would expect? Can you provide the specific repro steps to trigger this
issue? Do you have something set for python.languageServer?
—
Reply to this email directly, view it on GitHub
<#14073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOKAFYBAKA7FEKJNWTHSA3XUESMRANCNFSM6AAAAAA3HHJQQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
if you don't set it, it will use Pylance, which is what works for me. I'm guessing that's what you had when experiencing the issue? Valid values: "Default", "Jedi", "Pylance", "None". |
Next I send you the installed extensions and the settings.json.
Even with the recommendations that the VSCode tells me, it still works
badly.
{
"notebook.lineNumbers": "on",
"editor.wordWrapColumn": 140,
"editor.rulers": [
140
],
"editor.wordWrap": "wordWrapColumn",
"editor.wrappingIndent": "same",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"workbench.iconTheme": "vscode-icons",
"files.exclude": {
"**/desktop.ini": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
},
"terminal.integrated.confirmOnExit": "always",
"debug.confirmOnExit": "always",
"window.confirmBeforeClose": "always",
"jupyter.askForKernelRestart": false,
"window.restoreWindows": "none",
"explorer.autoReveal": false,
"workbench.colorTheme": "Default Dark+",
"notebook.diff.ignoreMetadata": true,
"git.autofetch": true,
"python.languageServer": "Pylance"
}
…On Wed, Aug 9, 2023, 6:03 PM Aaron Munger ***@***.***> wrote:
if you don't set it, it will use Pylance, which is what works for me. I'm
guessing that's what you had when experiencing the issue?
Valid values: "Default", "Jedi", "Pylance", "None".
if set to None, variables won't be highlighted at all.
—
Reply to this email directly, view it on GitHub
<#14073 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOKAF3LP324P4A5GQ2OEXLXUQJNHANCNFSM6AAAAAA3HHJQQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
hi I am having the exact same problem here. I don't know why or how it happens, I don't know the exact time, but i guess this issue has started a couple of weeks now, maybe after the few last updates, and maybe the problem is with the intellisense (maybe Pylance ?) Whatever the reason maybe, it is absolutely annoying, I have to close the entire vs code and reopen it in order for the VSCode to identify the variables. Please, Thank you |
Most likely caused by microsoft/pylance-release#4742 (comment) which sounds like it will be fixed soon |
or rather microsoft/pylance-release#4685 |
Applies To
What happened?
Variable references are lost when cells are deleted in an ipynb (jupyter notebook) file. When the notebook is very large, the references are also lost as the coding develops.
VS Code Version
Last
Jupyter Extension Version
Last
Jupyter logs
No response
Coding Language and Runtime Version
No response
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
Last
Running Jupyter locally or remotely?
Local
The text was updated successfully, but these errors were encountered: