kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.14k stars 570 forks source link

(sqlite3.ProgrammingError) Cannot operate on a closed database. #194

Open feipengzhao opened 4 years ago

feipengzhao commented 4 years ago

Excuse me, is this bug not fixed?

When run examples\randomuser-sqlite.py,This bug happened. It is because the sql connection was closed prematurely.

@shacknetisp Use close_with_result rather than closing connections too early.

For this commit, I have a question, that is, the close_with_result variable is set to True, so that the connection will not be closed, but when it is changed to False, should the connection be kept open? If there are many connections?

Submit the issue for the first time, if there is something wrong, please give me some suggestions.Thank you!