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

Jupyter environment variables load only once ever per kernel. #10755

Closed
2 tasks done
tbenthompson opened this issue Jul 10, 2022 · 5 comments
Closed
2 tasks done

Jupyter environment variables load only once ever per kernel. #10755

tbenthompson opened this issue Jul 10, 2022 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@tbenthompson
Copy link

tbenthompson commented Jul 10, 2022

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Once I run a notebook, the settings in the .env file become "stuck" across:

  • restarting the kernel
  • restarting VSCode entirely
  • restarting my laptop entirely
  • opening an entirely different notebook
  • deleting and re-creating the conda environment with the same name

The only solution is to create a conda env/kernel with a new name at which point the .env file is reloaded. But, again, only once.

It seems like there must be some kind of cache inside the extension?

Below, you can see two interactive windows that I loaded from two different kernels:

  1. On the left, this is the output from a kernel that I loaded before changing the .env file. This output is incorrect. The output here is after a full restart of VSCode.
  2. On the right, this is the output from a kernel that I loaded after changing the .env file. This output is correct.

image

VS Code Version

Version: 1.69.0 (Universal) Commit: 92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9 Date: 2022-07-07T05:28:41.511Z (3 days ago) Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Darwin arm64 21.5.0

Jupyter Extension Version

v2022.6.1001902341

Jupyter logs

No response

Coding Language and Runtime Version

Python 3.10.5

Language Extension Version (if applicable)

v2022.10.0

Anaconda Version (if applicable)

4.13.0

Running Jupyter locally or remotely?

No response

@tbenthompson tbenthompson added bug Issue identified by VS Code Team member as probable bug triage-needed Issue needs to be triaged labels Jul 10, 2022
@DonJayamanne
Copy link
Contributor

Thanks for filing this extension, i'll have a look at this soon.
Please note, we've identified a few issues related to the environment variables being loaded in kernels & plan on addressing them for the next release
See here #10359

@tbenthompson
Copy link
Author

Oh, haha, it's great to hear that there are known .env problems. I thought I was going crazy with this strange bug.

@DonJayamanne DonJayamanne added this to the July 2022 milestone Jul 11, 2022
@DonJayamanne DonJayamanne removed the triage-needed Issue needs to be triaged label Jul 11, 2022
@DonJayamanne
Copy link
Contributor

@tbenthompson Please could you :

  • Try this again
  • Provide all of the output from the Jupyter output panel (you can get to that using the command Jupyter: Show Output)

@tbenthompson
Copy link
Author

@DonJayamanne
Copy link
Contributor

Should be fixed with this PR #10843
Please could you install the latet pre-release version of the Jupyter extension and try this again (in vscode insiders) & let us know.
If it still persists, please feel free to reopen this issue, or I can do that.

@rebornix rebornix added the verified Verification succeeded label Jul 28, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 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

No branches or pull requests

3 participants