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

"__file__" variable not available in IPython after kernel restart #1373

Closed
alexbogun opened this issue Oct 30, 2020 · 7 comments
Closed

"__file__" variable not available in IPython after kernel restart #1373

alexbogun opened this issue Oct 30, 2020 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@alexbogun
Copy link

Environment data

  • VS Code version: 1.50.1
  • Extension version (available under the Extensions sidebar): v2020.10.332292344
  • OS and version: Win 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8
  • Type of virtual environment used conda
  • Value of the python.languageServer setting: Jedi

Expected behaviour

__file__ variable is always defined in IPython

Actual behaviour

__file__ variable is available when IPython first starts, but is not available after kernel restart.

Reverting to version v2020.9.112786 fixes the problem

Steps to reproduce:

  1. open VSCode
  2. create new Python script (.py)
  3. type print(__file__)
  4. Run Selection/Current line in Python Interactive
  5. Restart Jupyter kernel
  6. Run Selection/Current line in Python Interactive again
@DavidKutu
Copy link

Thanks for reporting it @alexbogun. That's a good catch. I could also repro it.
We'll discuss it on our next meeting.

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug reason-regression and removed temp-must-fix-december labels Nov 13, 2020
@rchiodo rchiodo self-assigned this Nov 16, 2020
This was referenced Nov 16, 2020
@IanMatthewHuff
Copy link
Member

Validated.
image.png

@alexbogun
Copy link
Author

Unfortunately the issue is back again, could we please reopen this?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 30, 2020

I'm reproing too.

@rchiodo rchiodo reopened this Nov 30, 2020
@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Nov 30, 2020

@rchiodo I don't believe this was in the point fix. Yeah, I don't see it in the release branch. I think this is fixed, but just not live for customers yet. I was validating from our main bits.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 30, 2020

Ah okay. Thanks. @alexbogun this will be fixed in our next stable release.

@IanMatthewHuff
Copy link
Member

Validated via the previous validation. Will be in the next release as mentioned.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
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
Projects
None yet
Development

No branches or pull requests

6 participants