From 5a16d5a51276d7d77c5474068c1b25ec2729ec62 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 9 Aug 2022 16:36:22 +0200 Subject: [PATCH] Deactivate database analyzer if user does not use sqlite --- freqtrade/freqai/data_kitchen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqai/data_kitchen.py b/freqtrade/freqai/data_kitchen.py index 96479b87c..adfd68c84 100644 --- a/freqtrade/freqai/data_kitchen.py +++ b/freqtrade/freqai/data_kitchen.py @@ -93,7 +93,12 @@ class FreqaiDataKitchen: if self.live: db_url = self.config.get('db_url', None) self.database_path = Path(db_url) - self.database_name = Path(*self.database_path.parts[1:]) + if 'sqlite' not in self.database_path.parts[0]: + self.database_path = None + logger.warning('FreqAI database analyzer only available for sqlite dbs. ' + ' FreqAI will still run, but user cannot use database analyzer.') + else: + self.database_name = Path(*self.database_path.parts[1:]) self.trade_database_df: DataFrame = pd.DataFrame()