Explorar o código

Try changing read_sql_to_dataframe to take a engine instead of a connection, to see if this will help with unclosed connections to the sql database

ogert %!s(int64=5) %!d(string=hai) anos
pai
achega
171430b223
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cdplib/db_handlers/SQLHandler.py

+ 1 - 1
cdplib/db_handlers/SQLHandler.py

@@ -511,7 +511,7 @@ class SQLHandler:
             connection.close()
             '''
             data = pd.read_sql(sql=query,
-                               con=self.engine,
+                               con=self._engine,
                                **read_sql_kwargs)
             return data