diff --git a/blankly/data/data_reader.py b/blankly/data/data_reader.py index 45c11b77..c9d1e139 100644 --- a/blankly/data/data_reader.py +++ b/blankly/data/data_reader.py @@ -111,7 +111,7 @@ def _parse_df_prices(self, file_paths: list, symbols: list, columns: set) -> Non self._check_length(file_paths[index], file_paths[index]) # Check if its contained - assert (columns.issubset(file_paths[index].columns)) + assert (columns.issubset(file_paths[index].columns)), f"{columns} not subset of {file_paths[index].columns}" # Now push it directly into the dataset and sort by time self._internal_dataset[symbols[index]] = file_paths[index].sort_values('time') @@ -130,7 +130,7 @@ def _parse_csv_prices(self, file_paths: list, symbols: list, columns: set) -> No self._check_length(contents, file_paths[index]) # Check if its contained - assert (columns.issubset(contents.columns)) + assert (columns.issubset(contents.columns)), f"{columns} not subset of {contents.columns}" # Now push it directly into the dataset and sort by time self._internal_dataset[symbols[index]] = contents.sort_values('time') diff --git a/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py b/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py index 640a64ec..1575bfc5 100644 --- a/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py +++ b/blankly/exchanges/interfaces/paper_trade/paper_trade_interface.py @@ -352,10 +352,10 @@ def get_account(self, symbol=None) -> utils.AttributeDict: return self.local_account.get_account(symbol) except KeyError: if self.backtesting: - raise KeyError("Symbol not found. This can be caused by an invalid quote currency " + raise KeyError(f"Symbol {symbol} not found. This can be caused by an invalid quote currency " "in backtest.json.") else: - raise KeyError("Symbol not found.") + raise KeyError(f"Symbol {symbol} not found.") def take_profit_order(self, symbol: str, price: float, size: float) -> TakeProfitOrder: # we don't simulate partial fills, this is the same as take_profit