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

UndefinedVariable in interactive window #3661

Closed
stevenlis opened this issue Nov 22, 2022 · 9 comments
Closed

UndefinedVariable in interactive window #3661

stevenlis opened this issue Nov 22, 2022 · 9 comments
Assignees
Labels
duplicate This issue or pull request already exists external bug

Comments

@stevenlis
Copy link

Environment data

  • Language Server version: v2022.11.30
  • OS and version: macos 13
  • Python version (& distribution if applicable, e.g. Anaconda): conda python 3.9.12

Pylance keep showing me UndefinedVariable error in the interactive window no matter what I do

CS-uREImsfs
CS-CFWlmlxf

@rchiodo rchiodo added needs investigation Could be an issue - needs investigation and removed triage-needed labels Nov 22, 2022
@debonte
Copy link
Contributor

debonte commented Nov 22, 2022

@StevenLi-DS, can you please provide the content of your "Python Language Server" log from VS Code's output pane?

@debonte debonte added waiting for user response Requires more information from user and removed needs investigation Could be an issue - needs investigation labels Nov 22, 2022
@stevenlis
Copy link
Author

@debonte hope this gotta be helpful
pylance-log.log

@debonte
Copy link
Contributor

debonte commented Nov 22, 2022

Are you sure the diagnostic is reportUndefinedVariable? What I'm seeing is reportUnusedExpression.

If that's what you're seeing also, this is a duplicate of #3282 which was fixed in our most recent prerelease build, 2022.11.31.

@stevenlis
Copy link
Author

This is what it's telling me as shown in the screenshot above as well.

CS-AECGHYhQ

@debonte
Copy link
Contributor

debonte commented Nov 23, 2022

I was able to repro this by downgrading my Jupyter extension to their current Release version. Can you try upgrading to the latest Pre-Release build of Jupyter? They had a regression earlier this month that caused them to start a second instance of Pylance, and I think the error you are seeing may be coming from that second instance.

That would also explain the multiple lines of type info for df seen in your first screenshot.

If you see a log like the following in the Output window in addition to the "Python Language Server" log, that would also indicate that you're hitting this.

image

@stevenlis
Copy link
Author

@debonte Thanks man. Indeed, after I switch to pre-release v2022.11.1003281132 Jupyter extension, the problem is gone. Maybe Jupyter extension version should also be included in the bug report template. lol..

@debonte debonte added external bug and removed waiting for user response Requires more information from user labels Nov 23, 2022
@debonte
Copy link
Contributor

debonte commented Nov 23, 2022

Duplicate of #3530

@debonte debonte marked this as a duplicate of #3530 Nov 23, 2022
@debonte debonte closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2022
@debonte debonte added the duplicate This issue or pull request already exists label Nov 23, 2022
@stevenlis
Copy link
Author

@debonte The issue seems back in v2023.2.10
CS-hJWqB1zb@2x

@debonte
Copy link
Contributor

debonte commented Feb 10, 2023

@StevenLi-DS, thanks for reporting this. I haven't been able to repro the issue yet though. Can you open a new issue with steps to reproduce the problem? Might as well include your Jupyter extension version too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists external bug
Projects
None yet
Development

No branches or pull requests

3 participants