From 9270695c950a99d15f970818247675411c91e90b Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Fri, 2 Feb 2024 18:16:34 -0600 Subject: [PATCH] bug fixes: sqlite writer with sqlalchemy --- transport/disk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/disk.py b/transport/disk.py index 2f39867..94c903c 100644 --- a/transport/disk.py +++ b/transport/disk.py @@ -113,8 +113,6 @@ class SQLite : self.conn = sqlite3.connect(self.path,isolation_level="IMMEDIATE") self.conn.row_factory = sqlite3.Row self.fields = _args['fields'] if 'fields' in _args else [] - path = self._path - self._engine = create_engine(f'sqlite://{path}') def has (self,**_args): found = False try: @@ -178,6 +176,8 @@ class SQLiteWriter(SQLite,DiskWriter) : # DiskWriter.__init__(self,**args) super().__init__(**args) self.table = args['table'] if 'table' in args else None + path = self.path + self._engine = create_engine(f'sqlite://{path}') # self.conn = sqlite3.connect(self.path,isolation_level="IMMEDIATE") # self.conn.row_factory = sqlite3.Row