From dc30ab3d36549449178f5e85bd015434196010e4 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Fri, 28 Jul 2023 21:13:42 -0500 Subject: [PATCH] Hotfix/ locking when deploying streamlit app (#5261) * fix locking when deploying streamlit app * Update streamlit_run.py * Update streamlit_run.py --- openbb_terminal/core/plots/no_import.py | 10 +++++----- openbb_terminal/dashboards/streamlit_run.py | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openbb_terminal/core/plots/no_import.py b/openbb_terminal/core/plots/no_import.py index eb3fa1f1029..3d9a22d084c 100644 --- a/openbb_terminal/core/plots/no_import.py +++ b/openbb_terminal/core/plots/no_import.py @@ -72,11 +72,11 @@ class DummyBackend: and get_current_system().LOGGING_SUB_APP != "sdk" ): console.print(pywry_missing) - if console.input( - "If you prefer to continue without interactive plots/tables, " - "press [green]enter[/] or [red]ctrl+c[/] to exit." - ): - dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0") + console.print( + "\n\nContinuing with default plotly behaviour (open in browser).", + style="yellow", + ) + dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0") current_user.preferences.USE_INTERACTIVE_DF = False set_current_user(current_user) diff --git a/openbb_terminal/dashboards/streamlit_run.py b/openbb_terminal/dashboards/streamlit_run.py index 7c14766b76d..3fe378a5884 100644 --- a/openbb_terminal/dashboards/streamlit_run.py +++ b/openbb_terminal/dashboards/streamlit_run.py @@ -5,9 +5,12 @@ from pathlib import Path import streamlit.web.bootstrap from openbb_terminal.core.config.paths import REPOSITORY_DIRECTORY -from openbb_terminal.core.plots.plotly_helper import theme +from openbb_terminal.core.session.current_system import set_system_variable +from openbb_terminal.core.session.current_user import set_preference -theme.apply_style("dark") +set_system_variable("LOGGING_SUPPRESS", True) +set_preference("CHART_STYLE", "dark") +set_preference("PLOT_ENABLE_PYWRY", "False") def main():