When a Python process exits that has some sqlitedict objects still in memory, the final pre-exit garbage collection can cause some unsightly errors being printed:
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method SqliteDict.__del_ of SqliteDict(/data/db.sqlite)> ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in ignored
Investigate why this happens (there are already checks in place inside __del__) and fix it.
Desired behaviour: if the sqlite connection is still open/active, close it; if not, or if any error happens (object already partially self-destructed by exit, or any other error.. we have little control over what we can do at this point), just ignore it and proceed.
When a Python process exits that has some sqlitedict objects still in memory, the final pre-exit garbage collection can cause some unsightly errors being printed:
Investigate why this happens (there are already checks in place inside
__del__
) and fix it.Desired behaviour: if the sqlite connection is still open/active, close it; if not, or if any error happens (object already partially self-destructed by exit, or any other error.. we have little control over what we can do at this point), just ignore it and proceed.