Check if file exists before loading

This commit is contained in:
Matthias 2019-12-25 15:24:53 +01:00
parent 873f5dbe6b
commit 53ee636fa0

View File

@ -66,6 +66,8 @@ class JsonDataHandler(IDataHandler):
:return: DataFrame with ohlcv data, or empty DataFrame
"""
filename = self._pair_data_filename(self._datadir, pair, timeframe)
if not filename.is_file():
return DataFrame(columns=self._columns)
pairdata = read_json(filename, orient='values')
pairdata.columns = self._columns
pairdata['date'] = to_datetime(pairdata['date'],