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

Changes to .env need a restart of vscode to become active in the Interactive Window #1722

Closed
ARF1 opened this issue Jan 29, 2020 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window verified Verification succeeded
Milestone

Comments

@ARF1
Copy link

ARF1 commented Jan 29, 2020

Bug: Interactive Window

Steps to cause the bug to occur

  1. Add an entry to .env: e.g. PYTHONPATH=../libraries/my_library;${PYTHONPATH}
  2. Launch the interactive window
  3. Run import sys; sys.path.
  4. Close interactive window (or not, as you wish)
  5. Change the entry to .env: e.g. PYTHONPATH=../libraries/my_library_FOO;${PYTHONPATH}
  6. Launch the interactive window
  7. Run import sys; sys.path.

Actual behavior

Entry from .env stays on my_library even after it was changed in .env to my_library_FOO.

Expected behavior

Make changed .env entries available in Interactive Window. (Or alternatively show a pop-up after .env was modified with the option to restart the server for the Interactive Window.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: 2020.1.58038
  • VS Code version: 1.41.1
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.8.1
  • OS: Windows
  • Virtual environment: conda

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@rchiodo
Copy link
Contributor

rchiodo commented Jan 29, 2020

We don't currently support usage of .env in the interactive window. See this bug:
https://github.com/microsoft/vscode-python/issues/7016

@rchiodo rchiodo closed this as completed Jan 29, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 5, 2020
@rchiodo
Copy link
Contributor

rchiodo commented Feb 14, 2020

Seems like we do support it now, but this update isn't working.

@rchiodo rchiodo reopened this Feb 14, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@greazer greazer added the bug Issue identified by VS Code Team member as probable bug label Jul 8, 2021
@greazer greazer added the interactive-window Impacts interactive window label Aug 3, 2021
@tbenthompson
Copy link

I just wanted to note that changes to my .env are not active in a notebook even after a VSCode restart. It seems like the only way to update environment variables set this way is to completely re-create my conda environment. Perhaps there's some kind of caching going on? This is quite surprising so maybe I'm doing something wrong.

@rchiodo
Copy link
Contributor

rchiodo commented Jul 11, 2022

Yes caching is going on. See this issue here:

#9774

@DonJayamanne
Copy link
Contributor

This should be fixed with #10843
Please install the latest pre-release version of the Jupyter extension into VS Code insiders and tet this tout.
If this problem still prerists, please feel free to reopen this issue or ping us and we'll do the same

@DonJayamanne DonJayamanne added this to the July 2022 milestone Jul 25, 2022
@rebornix rebornix added verified Verification succeeded and removed verified Verification succeeded labels 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 interactive-window Impacts interactive window verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants