I tried to use the PyCharm user environment variable configuration, however, it throws KeyError. If I try to set the variables via commands it works, but via configuration it does not. I will appreciate any help.
import os
print(os.environ['BLA'])
(venv) (base) mikam@Mikas-MacBook-Pro Scripts % python implementVar.py
Traceback (most recent call last):
File "/Users/mikam/Desktop/Scripts/implementVar.py", line 2, in <module>
print(os.environ['BLA'])
File "/usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'BLA'
.envfile and building my APIs to import it.