Fix "Too many open Files" exception

This commit is contained in:
Matthias
2021-05-18 20:39:55 +02:00
parent 16c22c7b68
commit 7a9853bfe1
2 changed files with 3 additions and 2 deletions

View File

@@ -271,8 +271,8 @@ class Hyperopt:
self.backtesting.strategy.trailing_only_offset_is_reached = \
d['trailing_only_offset_is_reached']
processed = load(self.data_pickle_file, mmap_mode='r')
with self.data_pickle_file.open('rb') as f:
processed = load(f, mmap_mode='r')
bt_results = self.backtesting.backtest(
processed=processed,
start_date=self.min_date,