From 78ebeef12565a0f65b6e0545272522c01689548b Mon Sep 17 00:00:00 2001 From: Phoebe Hu <68739569+Light-JH@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:15:19 -0700 Subject: [PATCH] print message if yahoo finance load fails (#5450) --- openbb_terminal/stocks/stocks_helper.py | 1 + openbb_terminal/stocks/stocks_model.py | 1 + 2 files changed, 2 insertions(+) diff --git a/openbb_terminal/stocks/stocks_helper.py b/openbb_terminal/stocks/stocks_helper.py index 4d9d76540bc8..83d9c2f6996b 100644 --- a/openbb_terminal/stocks/stocks_helper.py +++ b/openbb_terminal/stocks/stocks_helper.py @@ -411,6 +411,7 @@ def load( # Check that loading a stock was not successful if df_stock_candidate.empty: + console.print("[red]No results found in yahoo finance reply.[/red]") return pd.DataFrame() df_stock_candidate.index = pd.to_datetime( diff --git a/openbb_terminal/stocks/stocks_model.py b/openbb_terminal/stocks/stocks_model.py index 56bdde3f8129..f84a84034e7f 100644 --- a/openbb_terminal/stocks/stocks_model.py +++ b/openbb_terminal/stocks/stocks_model.py @@ -182,6 +182,7 @@ def load_stock_yf( # Check that loading a stock was not successful if df_stock_candidate.empty: + console.print("[red]No results found in yahoo finance reply.[/red]") return pd.DataFrame() df_stock_candidate_cols = [ "Open",