Deactivate database analyzer if user does not use sqlite

This commit is contained in:
robcaulk 2022-08-09 16:36:22 +02:00
parent e7de812948
commit 5a16d5a512

View File

@ -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()