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

.env file is ignored in a notebook and the interactive window #4593

Closed
Tracked by #1122
rchiodo opened this issue Feb 2, 2021 · 11 comments
Closed
Tracked by #1122

.env file is ignored in a notebook and the interactive window #4593

rchiodo opened this issue Feb 2, 2021 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Milestone

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Feb 2, 2021

Created a .env file like so:

MYGOOFVAR=GOOF

Ran some code like so:

print(os.getenv("MYGOOFVAR"))

MYGOOFVAR is not printed out.

@rchiodo rchiodo added the bug Issue identified by VS Code Team member as probable bug label Feb 2, 2021
@greazer
Copy link
Member

greazer commented Feb 4, 2021

This may be a regression. Joyce, please check to see if it repro's on Windows.

@joyceerhl
Copy link
Contributor

Repros on Windows for me.

@joyceerhl joyceerhl removed their assignment Feb 4, 2021
@DonJayamanne DonJayamanne self-assigned this Mar 23, 2021
@DonJayamanne
Copy link
Contributor

Cannot repro when debugging, brilliant..

@DonJayamanne DonJayamanne removed their assignment Mar 23, 2021
@greazer greazer added this to the April 2021 Release milestone Mar 24, 2021
@greazer greazer modified the milestones: April 2021 Release, May 2021 Release Apr 1, 2021
@greazer
Copy link
Member

greazer commented Apr 22, 2021

Based on other bugs we have on .env file use that indicate that the file is indeed being read and processed, this clearly must be a regression.

@greazer greazer modified the milestones: May 2021 Release, June 2021 Release Apr 26, 2021
@greazer
Copy link
Member

greazer commented Jun 4, 2021

Not getting upvotes or duplicate complaints. Therefore, it's either NOT a regression or even if it is, it doesn't affect many people. Moving to July for now.

@greazer greazer added the notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) label Aug 2, 2021
@DonJayamanne
Copy link
Contributor

Going to try on windows

@DonJayamanne DonJayamanne self-assigned this Oct 7, 2021
@greazer greazer added this to the On Deck milestone Oct 8, 2021
@DonJayamanne DonJayamanne removed their assignment Oct 11, 2021
@chart-magnum
Copy link

I have this issue as described in #7926

@greazer greazer removed this from the On Deck milestone Oct 25, 2021
@greazer greazer added this to the November 2021 milestone Oct 25, 2021
@rchiodo rchiodo modified the milestones: November 2021, January 2022 Dec 6, 2021
@rchiodo rchiodo removed this from the January 2022 milestone Dec 16, 2021
@DonJayamanne DonJayamanne added this to the February 2022 milestone Feb 22, 2022
@DonJayamanne DonJayamanne self-assigned this Feb 22, 2022
@DonJayamanne
Copy link
Contributor

Fixed as part of #9018
Closing to get this tested

@joyceerhl joyceerhl added the verified Verification succeeded label Feb 25, 2022
@joyceerhl
Copy link
Contributor

Verified:

image

@giswqs
Copy link

giswqs commented Jan 24, 2023

I just ran into the same problem. When should be .env file be saved to?

@giswqs
Copy link

giswqs commented Jan 24, 2023

Nevermind. I figured it out. The .env file needs to be put in the root directory. #10928

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 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 notebook-kernel Kernels issues (start/restart/switch/execution, install ipykernel) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants