You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No issues running CYT short term, but if ran long enough I observe the following happening with various functions it performs.
cursorObj.execute(“SELECT…..)
sqlite3.OperationalError: database is locked
Recent encounter is line 104, sql_fetch_past_5
I wrapped one of the functions with a try/except block and while True it tries to select, if successful it breaks out but if not it sleeps for 1 second. I don’t know if that’s the best approach and even if so I guess I’d have to apply it to every function.
Better suggestions or thoughts?
The text was updated successfully, but these errors were encountered:
If you take a look into the "map" branch the SQL exceptions are captured in chasing_your_tail.py, and to avoid the database to be blocked the cursorObj is closed.
There are also some prints out to see more details about the exception details, in case a new exception happens.
If you want to try the map branch take a look at the pdf, because you will need a GPS antenna so the tails are printed in a map.
Because I was developing the map feature I also fixed the issues I found on the way.
No issues running CYT short term, but if ran long enough I observe the following happening with various functions it performs.
cursorObj.execute(“SELECT…..)
sqlite3.OperationalError: database is locked
Recent encounter is line 104, sql_fetch_past_5
I wrapped one of the functions with a try/except block and while True it tries to select, if successful it breaks out but if not it sleeps for 1 second. I don’t know if that’s the best approach and even if so I guess I’d have to apply it to every function.
Better suggestions or thoughts?
The text was updated successfully, but these errors were encountered: