Skip to content

Commit

Permalink
Hotfix/ locking when deploying streamlit app (#5261)
Browse files Browse the repository at this point in the history
* fix locking when deploying streamlit app

* Update streamlit_run.py

* Update streamlit_run.py
  • Loading branch information
tehcoderer authored Jul 29, 2023
1 parent 73348c0 commit dc30ab3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions openbb_terminal/core/plots/no_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ def __init__(self, daemon: bool = True, max_retries: int = 30):
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)
Expand Down
7 changes: 5 additions & 2 deletions openbb_terminal/dashboards/streamlit_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
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():
Expand Down

0 comments on commit dc30ab3

Please sign in to comment.