Skip to content

Commit

Permalink
wrap downloader in try block
Browse files Browse the repository at this point in the history
  • Loading branch information
enarjord committed Nov 18, 2024
1 parent 1c2ef84 commit 76c8de8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,16 @@ async def main():
update_config_with_args(config, args)
config = format_config(config)
for symbol in config["backtest"]["symbols"]:
data = await load_hlcvs(
symbol,
config["backtest"]["start_date"],
config["backtest"]["end_date"],
exchange=config["backtest"]["exchange"],
)
try:
data = await load_hlcvs(
symbol,
config["backtest"]["start_date"],
config["backtest"]["end_date"],
exchange=config["backtest"]["exchange"],
)
except Exception as e:
logging.error(f"Error with {symbol} {e}")
traceback.print_exc()


if __name__ == "__main__":
Expand Down

0 comments on commit 76c8de8

Please sign in to comment.