From 0d7318bdc97738929802587f5a8fd601c49dfa38 Mon Sep 17 00:00:00 2001 From: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:05:15 +0100 Subject: [PATCH] fix rm command (#4890) Co-authored-by: Henrique Joaquim --- openbb_terminal/cryptocurrency/due_diligence/messari_view.py | 3 +-- openbb_terminal/helper_funcs.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py index 6977d467cb28..12eea754f1c4 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py @@ -340,7 +340,6 @@ def display_roadmap( ) df_copy = df_copy[df_copy["Date"].notnull()] - titles = list(df_copy[df_copy["Date"] > df_prices.index[0]]["Title"]) max_price = df_prices["Close"].max() for counter, x in enumerate(roadmap_dates): @@ -348,7 +347,7 @@ def display_roadmap( fig.add_annotation( x=x, y=max_price * 0.7, - text=titles[counter], + text=df.iloc[counter]["Title"], textangle=90, font=dict(size=15), xshift=10, diff --git a/openbb_terminal/helper_funcs.py b/openbb_terminal/helper_funcs.py index cd845ad0b200..a4eee4f0ab00 100644 --- a/openbb_terminal/helper_funcs.py +++ b/openbb_terminal/helper_funcs.py @@ -307,7 +307,7 @@ def print_rich_table( try: if not isinstance(df[col].iloc[0], pd.Timestamp): df[col] = pd.to_numeric(df[col]) - except ValueError: + except (ValueError, TypeError): pass def _get_headers(_headers: Union[List[str], pd.Index]) -> List[str]: