Error :database is lockedfor query : INSERT OR IGNORE INTO `mra_photos` (`day_taken_at`, `hour_taken_at`, `filename`, `to_upload`) VALUES ("20260101", "14:45:15" , "/home/pi/Desktop/images/01012026/14/45/image_01012026_14_45_15_9729.jpg", 0) try second time after 15 secs Error :database is lockedfor query : INSERT OR IGNORE INTO `mra_photos` (`day_taken_at`, `hour_taken_at`, `filename`, `to_upload`) VALUES ("20260101", "14:45:15" , "/home/pi/Desktop/images/01012026/14/45/image_01012026_14_45_15_9729.jpg", 0) Error :database is locked Error :database is locked Traceback (most recent call last): File "/home/pi/workarea/git/raspi-fotonower-x/python/insert_obj_in_db.py", line 109, in insert_new_photos_in_db(lsr, x.folder, x.verbose, x.flat_folder_date) File "/home/pi/workarea/git/raspi-fotonower-x/python/insert_obj_in_db.py", line 44, in insert_new_photos_in_db last_photo_in_db = lsrl.sql_conn.get_last_photo_infos() File "/home/pi/workarea/git/raspi-fotonower-x/python/lib/conn_sqlite.py", line 208, in get_last_photo_infos return data UnboundLocalError: local variable 'data' referenced before assignment Error :database is locked Traceback (most recent call last): File "/home/pi/workarea/git/raspi-fotonower-x/python/insert_obj_in_db.py", line 109, in insert_new_photos_in_db(lsr, x.folder, x.verbose, x.flat_folder_date) File "/home/pi/workarea/git/raspi-fotonower-x/python/insert_obj_in_db.py", line 44, in insert_new_photos_in_db last_photo_in_db = lsrl.sql_conn.get_last_photo_infos() File "/home/pi/workarea/git/raspi-fotonower-x/python/lib/conn_sqlite.py", line 208, in get_last_photo_infos return data UnboundLocalError: local variable 'data' referenced before assignment empty photo_infos list in append_photo_list : nothing done empty photo_infos list in append_photo_list : nothing done empty photo_infos list in append_photo_list : nothing done