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 variable substitution seems broken #114435

Closed
RussSchultz opened this issue Jan 15, 2021 · 4 comments
Closed

.env file variable substitution seems broken #114435

RussSchultz opened this issue Jan 15, 2021 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@RussSchultz
Copy link

Version: 1.52.1 (user setup)
Commit: ea3859d
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363

variables don't seem to be substituting correctly in the .env file.

in settings.json:
"python.envFile" : "${workspaceFolder}/.env",

in .env:
PYTHONPATH=${PROJ_DIR}/utf;${WORKSPACE_FOLDER};${workspaceFolder}/tools/api_generation

In python file launched by F5:
import sys
import os
print(sys.path)
print(os.environ['PYTHONPATH'])

output:
['c:\\silabs\\falcon2-repository\\modules\\falcon2-modules\\api\\system_manager_api\\pyapi', 'C:\\utf', 'C:\\silabs\\falcon2-repository', 'C:\\tools\\api_generation', 'c:\\silabs\\Python\\Python38\\python38.zip', 'c:\\silabs\\Python\\Python38\\DLLs', 'c:\\silabs\\Python\\Python38\\lib', 'c:\\silabs\\Python\\Python38', 'C:\\Users\\ruschult\\AppData\\Roaming\\Python\\Python38\\site-packages', 'c:\\silabs\\Python\\Python38\\lib\\site-packages', 'c:\\silabs\\Python\\Python38\\lib\\site-packages\\win32', 'c:\\silabs\\Python\\Python38\\lib\\site-packages\\win32\\lib', 'c:\\silabs\\Python\\Python38\\lib\\site-packages\\Pythonwin']

/utf;;/tools/api_generation;C:\silabs\falcon2-repository

You can see the variables are just not getting substituted. This did work at one point, but i'm not sure how to easily regress versions of VSCODE.

@vscodebot
Copy link

vscodebot bot commented Jan 15, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@weinand
Copy link
Contributor

weinand commented Jan 15, 2021

/extPython

@weinand
Copy link
Contributor

weinand commented Jan 15, 2021

VS Code does not know anything about .env files.
if this worked before, it must be a feature of the Python extension.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants
@weinand @RussSchultz and others