From 4dac3b1f834cfb50e00826c7f5a2fe51f930e629 Mon Sep 17 00:00:00 2001 From: CarlosEpia Date: Wed, 9 Aug 2023 09:12:09 +0200 Subject: [PATCH] include engine and session to loaded etrago obj --- etrago/tools/network.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etrago/tools/network.py b/etrago/tools/network.py index 732ced23..d9fc85eb 100644 --- a/etrago/tools/network.py +++ b/etrago/tools/network.py @@ -195,6 +195,12 @@ def __init__( self.get_clustering_data(csv_folder_name) + conn = db.connection(section=self.args["db"]) + self.engine = conn + + session = sessionmaker(bind=conn) + self.session = session() + else: logger.error("Set args or csv_folder_name")