From 41eeb9917788abbbf3e88f96bebc609c3906aa3a Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Sun, 17 Jul 2022 10:05:21 +0200 Subject: [PATCH] load pickle file for writing --- freqtrade/freqai/data_drawer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/data_drawer.py b/freqtrade/freqai/data_drawer.py index 4e8858349..41736c154 100644 --- a/freqtrade/freqai/data_drawer.py +++ b/freqtrade/freqai/data_drawer.py @@ -78,9 +78,9 @@ class FreqaiDataDrawer: """ exists = Path(self.full_path / str("historic_predictions.pkl")).resolve().exists() if exists: - with open(self.full_path / str("historic_predictions.pkl"), "rb") as fp: + with open(self.full_path / str("historic_predictions.pkl"), "wb") as fp: self.historic_predictions = pickle.load(fp) - logger.info(f"Found existing historic predictions at {self.full_path}, but beware of " + logger.info(f"Found existing historic predictions at {self.full_path}, but beware " "that statistics may be inaccurate if the bot has been offline for " "an extended period of time.") elif not self.follow_mode: