From c651e0ac8278c854dc5901189d598b247e8d64ea Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Sat, 22 Feb 2020 19:46:40 +0300 Subject: [PATCH] Fix #2948 --- freqtrade/data/history/jsondatahandler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/freqtrade/data/history/jsondatahandler.py b/freqtrade/data/history/jsondatahandler.py index 606018f34..ee653d937 100644 --- a/freqtrade/data/history/jsondatahandler.py +++ b/freqtrade/data/history/jsondatahandler.py @@ -69,10 +69,11 @@ class JsonDataHandler(IDataHandler): filename = self._pair_data_filename(self._datadir, pair, timeframe) if not filename.exists(): return DataFrame(columns=self._columns) - pairdata = read_json(filename, orient='values', - dtype={'open': 'float', 'high': 'float', - 'low': 'float', 'close': 'float', 'volume': 'float'}) + pairdata = read_json(filename, orient='values') pairdata.columns = self._columns + pairdata = pairdata.astype(copy=False, + dtype={'open': 'float', 'high': 'float', + 'low': 'float', 'close': 'float', 'volume': 'float'}) pairdata['date'] = to_datetime(pairdata['date'], unit='ms', utc=True,