Check if file exists before loading
This commit is contained in:
parent
873f5dbe6b
commit
53ee636fa0
@ -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'],
|
||||
|
Loading…
Reference in New Issue
Block a user