ashald / EnvFile

EnvFile 3.x is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

env file not being recognized in yaml file

franciellevp opened this issue · comments

I have a yml file with env variables

Input:
app_id: ${APP_ID}
api_key_id: ${API_KEY_ID}
...

the values are setted in a .env file. but when i try to run the error of not finding the variable "APP_ID" is showed.
Screenshot_20220919_131336

In the python files all works fine, but in the yaml file the envs arent find

I've tried to put the .env file in the same directory of the yaml file, but also not working

  1. The YAML env provider treats the YAML file as a dictionary so your file would result into 1 env var called input - just run a simple program that prints out env vars and you will see it
  2. You need to check "Substitute Environment Variables"
  1. The YAML env provider treats the YAML file as a dictionary so your file would result into 1 env var called input - just run a simple program that prints out env vars and you will see it

    1. You need to check "Substitute Environment Variables"

Sorry I dont really get it and I think I wasnt clear. I checked "Substitute Environment Variables" and isnt working yet.

I have a .env file and a YAML file that uses the variables setted in the .env

.env
APP_ID=123
API_KEY_ID=123
...

credentials.yml:
app_id: ${APP_ID}
api_key_id: ${API_KEY_ID}
...

the file credentials.yml cant find the var APP_ID

I cannot reproduce the issue you're describing - see screenshot demonstrating setup with 2 files and interpolation across them.
CleanShot 2022-09-23 at 19 06 53@2x

after the last update of Pycharm (2022.2.2 to 2022.2.3) the error isnt occurring anymore.
Thanks for your replies. I think it was something with the versions of Pycharm Professional and the plugin.
image