From 9fd6445271b1baa10d9b2ebd32f48e8ac441694c Mon Sep 17 00:00:00 2001 From: didier Date: Sat, 10 Apr 2021 23:16:26 +0100 Subject: [PATCH] Fix view command, that was reloading tickers --- gamestonk_terminal/main_helper.py | 18 ------------------ terminal.py | 3 ++- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/gamestonk_terminal/main_helper.py b/gamestonk_terminal/main_helper.py index 27c0cacdb09..aee3aa5d49e 100644 --- a/gamestonk_terminal/main_helper.py +++ b/gamestonk_terminal/main_helper.py @@ -369,24 +369,6 @@ def view(l_args, s_ticker, s_start, s_interval, df_stock): type_candles = lett_to_num(ns_parser.type) - try: - ts = TimeSeries(key=cfg.API_KEY_ALPHAVANTAGE, output_format="pandas") - # Daily - if s_interval == "1440min": - # pylint: disable=unbalanced-tuple-unpacking - df_stock, _ = ts.get_daily_adjusted(symbol=s_ticker, outputsize="full") - # Intraday - else: - # pylint: disable=unbalanced-tuple-unpacking - df_stock, _ = ts.get_intraday( - symbol=s_ticker, outputsize="full", interval=s_interval - ) - - except Exception as e: - print(e) - print("Either the ticker or the API_KEY are invalids. Try again!") - return - df_stock.sort_index(ascending=True, inplace=True) # Slice dataframe from the starting date YYYY-MM-DD selected diff --git a/terminal.py b/terminal.py index 74e02a04cd2..7e8f5e7e9b9 100644 --- a/terminal.py +++ b/terminal.py @@ -177,7 +177,8 @@ def main(): else: print( - "No ticker selected. Use 'load ticker' to load the ticker you want to look at." + "No ticker selected. Use 'load ticker' to load the ticker you want to look at.", + "\n" ) main_cmd = True