From a6c0614d89c8a916bce09e807e4f8fa7811fd982 Mon Sep 17 00:00:00 2001 From: jmaslek Date: Sat, 31 Jul 2021 13:50:45 -0400 Subject: [PATCH] Specify the path to .env file for reading keys (#582) --- gamestonk_terminal/config_terminal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gamestonk_terminal/config_terminal.py b/gamestonk_terminal/config_terminal.py index 2d5e74128ce..58469a4562b 100644 --- a/gamestonk_terminal/config_terminal.py +++ b/gamestonk_terminal/config_terminal.py @@ -1,7 +1,9 @@ import os from dotenv import load_dotenv -load_dotenv() +env_files = [f for f in os.listdir() if f.endswith(".env")] +if env_files: + load_dotenv(env_files[0]) # By default the jupyter notebook will be run on port 8888 PAPERMILL_NOTEBOOK_REPORT_PORT = "8888"