forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python ignores the .env file #24486
Labels
triage-needed
Needs assignment to the proper sub-team
Comments
github-actions
bot
added
the
triage-needed
Needs assignment to the proper sub-team
label
Nov 25, 2024
@rhalaly Where are you setting this? From the error it looks like you may not have a workspace opened. |
github-actions
bot
added
the
info-needed
Issue requires more information from poster
label
Nov 25, 2024
Of course I have. I opened a folder which is my repo's root and have |
github-actions
bot
removed
the
info-needed
Issue requires more information from poster
label
Nov 25, 2024
Can you share the entire log? Also, when you say run Python code, how are you running it? Using the run in terminal command, or using a activated terminal? |
github-actions
bot
added
the
info-needed
Issue requires more information from poster
label
Nov 25, 2024
github-actions
bot
removed
the
info-needed
Issue requires more information from poster
label
Nov 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Type: Bug
Behaviour
Setting
python.envFile
to.env
ignores it and the environment variables are not found at runtime.Steps to reproduce:
python.envFile
to${workspaceFolder}/.env
under User settings..env
file in the repo's root..env
(or evenPYTHONPATH
)Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.20.0
VS Code version: Code 1.95.3 (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Windows_NT x64 10.0.26100
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
A/B Experiments
The text was updated successfully, but these errors were encountered: