From 4670ddbabcc506a7896f062bdc01f88dede73ccc Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Sun, 7 Apr 2019 05:06:31 +0200 Subject: [PATCH] Fix4Windowsv2. --- ...33.074496.csv => dotaplayers-2019-04-06-13-43-33.074496.csv} | 0 server/nightr/strategies/steam.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename server/nightr/strategies/{dotaplayers-2019-04-06-13:43:33.074496.csv => dotaplayers-2019-04-06-13-43-33.074496.csv} (100%) diff --git a/server/nightr/strategies/dotaplayers-2019-04-06-13:43:33.074496.csv b/server/nightr/strategies/dotaplayers-2019-04-06-13-43-33.074496.csv similarity index 100% rename from server/nightr/strategies/dotaplayers-2019-04-06-13:43:33.074496.csv rename to server/nightr/strategies/dotaplayers-2019-04-06-13-43-33.074496.csv diff --git a/server/nightr/strategies/steam.py b/server/nightr/strategies/steam.py index dd0671d..142d709 100644 --- a/server/nightr/strategies/steam.py +++ b/server/nightr/strategies/steam.py @@ -14,7 +14,7 @@ def dota2_players(context: Context) -> Prediction: # Find the historic data closest matching the current number of players. Lol yolo current_players = get_dota2_players() - with Path(__file__).parent.joinpath("dotaplayers-2019-04-06-13:43:33.074496.csv").open() as csv: + with Path(__file__).parent.joinpath("dotaplayers-2019-04-06-13-43-33.074496.csv").open() as csv: best_players, best_dt = min(csv, key=lambda l: abs(int(l.rstrip().split(", ")[0]) - current_players)).rstrip().split(", ") best_match_players = int(best_players) best_match_datetime = datetime.strptime(best_dt, "%Y-%m-%d %H:%M:%S.%f")