I have created in-memory database using sqlite3 in python and execuet a query with this line
conn = sqlite3.connect(':memory:') df_selected.to_sql('my_table', conn, index=False) df1 = pd.read_sql_query(sql_query, conn)
where df is dataframe.sometimes i face this error, 'unable to open database file' when executing te query.I see no solution for this in google, so posted here.please help.
note: iam running them in flask visual studio.
First, I forgot to close the connection in the end.So i added conn.close() yet i face this issue.