Skip to content

Commit

Permalink
print message if yahoo finance load fails (#5450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Light-JH committed Sep 20, 2023
1 parent bfe8afc commit 78ebeef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions openbb_terminal/stocks/stocks_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions openbb_terminal/stocks/stocks_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 78ebeef

Please sign in to comment.