[GH-ISSUE #338] Error - database is locked - appears many times and the bot stops #287

Open
opened 2026-03-02 23:39:16 +03:00 by kerem · 3 comments
Owner

Originally created by @cecimascaras on GitHub (May 8, 2021).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/338

How to solve?

Crash-2021-05-08-11-17-49.zip
Crash-2021-05-08-11-17-49.zip

Caught an exception:

[05/08 11:17:49] Error - database is locked
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql
cursor.execute(sql, params or ())
C

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "insomniac/extra_features/session.py", line 218, in run
File "D:\Insomniac-master3\insomniac\action_runners\interact_init_.py", line 343, in run
job()
File "D:\Insomniac-master3\insomniac\safely_runner.py", line 19, in wrapper
func(*args, **kwargs)
File "D:\Insomniac-master3\insomniac\action_runners\interact_init_.py", line 324, in job
handle_target(device_wrapper.get(),
File "D:\Insomniac-master3\insomniac\action_runners\interact\action_handle_target.py", line 208, in handle_target
if open_user(device=device, username=target, refresh=False, deep_link_usage_percentage=50, on_action=on_action):
File "D:\Insomniac-master3\insomniac\actions_impl.py", line 79, in open_user
return _open_user(device, username, False, False, refresh, deep_link_usage_percentage, on_action)
File "D:\Insomniac-master3\insomniac\actions_impl.py", line 622, in _open_user
if not search_for(device, username=username, on_action=on_action):
File "D:\Insomniac-master3\insomniac\navigation.py", line 35, in search_for
target_view = search_view.navigate_to_username(username, on_action)
File "D:\Insomniac-master3\insomniac\views.py", line 441, in navigate_to_username
on_action(GetProfileAction(user=username))
File "D:\Insomniac-master3\insomniac\session.py", line 216, in on_action_callback
self.session_state.add_action(action)
File "D:\Insomniac-master3\insomniac\session_state.py", line 70, in add_action
self.storage.log_get_profile_action(self.id, action.user)
File "D:\Insomniac-master3\insomniac\storage.py", line 54, in wrap
return func(*args, **kwargs)
File "D:\Insomniac-master3\insomniac\storage.py", line 218, in log_get_profile_action
self.profile.log_get_profile_action(session_id, username)
File "D:\Insomniac-master3\insomniac\db_models.py", line 92, in log_get_profile_action
session = SessionInfo.get(SessionInfo.id == session_id)
File "C:\Python38\lib\site-packages\peewee.py", line 6438, in get
return sq.get()
File "C:\Python38\lib\site-packages\peewee.py", line 6884, in get
return clone.execute(database)[0]
File "C:\Python38\lib\site-packages\peewee.py", line 1907, in inner
return method(self, database, *args, **kwargs)
File "C:\Python38\lib\site-packages\peewee.py", line 1978, in execute
return self._execute(database)
File "C:\Python38\lib\site-packages\peewee.py", line 2150, in _execute
cursor = database.execute(self)
File "C:\Python38\lib\site-packages\peewee.py", line 3157, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\Python38\lib\site-packages\peewee.py", line 3151, in execute_sql
self.commit()
File "C:\Python38\lib\site-packages\peewee.py", line 2917, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "C:\Python38\lib\site-packages\peewee.py", line 190, in reraise
raise value.with_traceback(tb)
File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: database is locked

[05/08 11:17:50] Crash saved as "crashes/Crash-2021-05-08-11-17-49.zip".
[05/08 11:17:50] Please attach this file if you gonna report the crash at
[05/08 11:17:50] https://github.com/alexal1/Insomniac/issues

[05/08 11:17:50] Close Instagram app

If you like this bot, please give us a star:
https://github.com/alexal1/Insomniac

-------- FINISH: 2021-05-08 11:17:52.507329 --------

TOTAL
Completed sessions: 1
Total duration: 0:17:32.040918
Total interactions: (19) 19 for targets
Successful interactions: (18) 18 for targets
Total followed : (17) 1 for cahferreiraa, 1 for projetothatafitt, 1 for mairatgr, 1 for franciscocharlesinstrutorsolda, 1 for maryliasantos84, 1 for pesca.araguaia, 1 for guipadilhaa, 1 for cidinhapupo, 1 for poxaa_juu, 1 for caiiio_n, 1 for jaque_glicerio02, 1 for leticiabilha, 1 for suiciniv_travel, 1 for valleriapupo, 1 for silviorodriguesapresenta, 1 for anapaula77, 1 for jepretti
Total likes: 12
Total unfollowed: 0
Total stories watches: 4
Total comments: 0
Total get-profile: 13
Total scraped: 0
Removed mass followers: none

Originally created by @cecimascaras on GitHub (May 8, 2021). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/338 How to solve? [Crash-2021-05-08-11-17-49.zip](https://github.com/alexal1/Insomniac/files/6446323/Crash-2021-05-08-11-17-49.zip) [Crash-2021-05-08-11-17-49.zip](https://github.com/alexal1/Insomniac/files/6446324/Crash-2021-05-08-11-17-49.zip) Caught an exception: [05/08 11:17:49] Error - database is locked Traceback (most recent call last): File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql cursor.execute(sql, params or ()) C During handling of the above exception, another exception occurred: Traceback (most recent call last): File "insomniac/extra_features/session.py", line 218, in run File "D:\Insomniac-master3\insomniac\action_runners\interact\__init__.py", line 343, in run job() File "D:\Insomniac-master3\insomniac\safely_runner.py", line 19, in wrapper func(*args, **kwargs) File "D:\Insomniac-master3\insomniac\action_runners\interact\__init__.py", line 324, in job handle_target(device_wrapper.get(), File "D:\Insomniac-master3\insomniac\action_runners\interact\action_handle_target.py", line 208, in handle_target if open_user(device=device, username=target, refresh=False, deep_link_usage_percentage=50, on_action=on_action): File "D:\Insomniac-master3\insomniac\actions_impl.py", line 79, in open_user return _open_user(device, username, False, False, refresh, deep_link_usage_percentage, on_action) File "D:\Insomniac-master3\insomniac\actions_impl.py", line 622, in _open_user if not search_for(device, username=username, on_action=on_action): File "D:\Insomniac-master3\insomniac\navigation.py", line 35, in search_for target_view = search_view.navigate_to_username(username, on_action) File "D:\Insomniac-master3\insomniac\views.py", line 441, in navigate_to_username on_action(GetProfileAction(user=username)) File "D:\Insomniac-master3\insomniac\session.py", line 216, in on_action_callback self.session_state.add_action(action) File "D:\Insomniac-master3\insomniac\session_state.py", line 70, in add_action self.storage.log_get_profile_action(self.id, action.user) File "D:\Insomniac-master3\insomniac\storage.py", line 54, in wrap return func(*args, **kwargs) File "D:\Insomniac-master3\insomniac\storage.py", line 218, in log_get_profile_action self.profile.log_get_profile_action(session_id, username) File "D:\Insomniac-master3\insomniac\db_models.py", line 92, in log_get_profile_action session = SessionInfo.get(SessionInfo.id == session_id) File "C:\Python38\lib\site-packages\peewee.py", line 6438, in get return sq.get() File "C:\Python38\lib\site-packages\peewee.py", line 6884, in get return clone.execute(database)[0] File "C:\Python38\lib\site-packages\peewee.py", line 1907, in inner return method(self, database, *args, **kwargs) File "C:\Python38\lib\site-packages\peewee.py", line 1978, in execute return self._execute(database) File "C:\Python38\lib\site-packages\peewee.py", line 2150, in _execute cursor = database.execute(self) File "C:\Python38\lib\site-packages\peewee.py", line 3157, in execute return self.execute_sql(sql, params, commit=commit) File "C:\Python38\lib\site-packages\peewee.py", line 3151, in execute_sql self.commit() File "C:\Python38\lib\site-packages\peewee.py", line 2917, in __exit__ reraise(new_type, new_type(exc_value, *exc_args), traceback) File "C:\Python38\lib\site-packages\peewee.py", line 190, in reraise raise value.with_traceback(tb) File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: database is locked [05/08 11:17:50] Crash saved as "crashes/Crash-2021-05-08-11-17-49.zip". [05/08 11:17:50] Please attach this file if you gonna report the crash at [05/08 11:17:50] https://github.com/alexal1/Insomniac/issues [05/08 11:17:50] Close Instagram app If you like this bot, please give us a star: https://github.com/alexal1/Insomniac -------- FINISH: 2021-05-08 11:17:52.507329 -------- TOTAL Completed sessions: 1 Total duration: 0:17:32.040918 Total interactions: (19) 19 for targets Successful interactions: (18) 18 for targets Total followed : (17) 1 for _cahferreiraa, 1 for projetothatafitt, 1 for mairatgr, 1 for franciscocharlesinstrutorsolda, 1 for maryliasantos84, 1 for pesca.araguaia, 1 for guipadilhaa, 1 for cidinhapupo, 1 for poxaa_juu_, 1 for caiiio_n, 1 for jaque_glicerio02, 1 for leticiabilha, 1 for suiciniv_travel, 1 for valleriapupo, 1 for silviorodriguesapresenta, 1 for anapaula77, 1 for jepretti Total likes: 12 Total unfollowed: 0 Total stories watches: 4 Total comments: 0 Total get-profile: 13 Total scraped: 0 Removed mass followers: none
Author
Owner

@cecimascaras commented on GitHub (May 24, 2021):

.
The problem continues in version 3.7.12
Crash-2021-05-24-09-25-41.zip

Caught an exception:

[05/24 09:25:41] Error - database is locked
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql
cursor.execute(sql, params or ())
sqlite3.OperationalError: database is locked

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "insomniac/extra_features/session.py", line 218, in run
File "D:\Insomniac-master3\insomniac\action_runners\interact_init_.py", line 343, in run
job()
File "D:\Insomniac-master3\insomniac\safely_runner.py", line 19, in wrapper
func(*args, **kwargs)
File "D:\Insomniac-master3\insomniac\action_runners\interact_init_.py", line 324, in job
handle_target(device_wrapper.get(),
File "D:\Insomniac-master3\insomniac\action_runners\interact\action_handle_target.py", line 208, in handle_target
if open_user(device=device, username=target, refresh=False, deep_link_usage_percentage=50, on_action=on_action):
File "D:\Insomniac-master3\insomniac\actions_impl.py", line 79, in open_user
return _open_user(device, username, False, False, refresh, deep_link_usage_percentage, on_action)
File "D:\Insomniac-master3\insomniac\actions_impl.py", line 622, in _open_user
if not search_for(device, username=username, on_action=on_action):
File "D:\Insomniac-master3\insomniac\navigation.py", line 35, in search_for
target_view = search_view.navigate_to_username(username, on_action)
File "D:\Insomniac-master3\insomniac\views.py", line 419, in navigate_to_username
on_action(GetProfileAction(user=username))
File "D:\Insomniac-master3\insomniac\session.py", line 216, in on_action_callback
self.session_state.add_action(action)
File "D:\Insomniac-master3\insomniac\session_state.py", line 70, in add_action
self.storage.log_get_profile_action(self.id, action.user)
File "D:\Insomniac-master3\insomniac\storage.py", line 54, in wrap
return func(*args, **kwargs)
File "D:\Insomniac-master3\insomniac\storage.py", line 222, in log_get_profile_action
self.profile.log_get_profile_action(session_id, username)
File "D:\Insomniac-master3\insomniac\db_models.py", line 92, in log_get_profile_action
session = SessionInfo.get(SessionInfo.id == session_id)
File "C:\Python38\lib\site-packages\peewee.py", line 6438, in get
return sq.get()
File "C:\Python38\lib\site-packages\peewee.py", line 6884, in get
return clone.execute(database)[0]
File "C:\Python38\lib\site-packages\peewee.py", line 1907, in inner
return method(self, database, *args, **kwargs)
File "C:\Python38\lib\site-packages\peewee.py", line 1978, in execute
return self._execute(database)
File "C:\Python38\lib\site-packages\peewee.py", line 2150, in _execute
cursor = database.execute(self)
File "C:\Python38\lib\site-packages\peewee.py", line 3157, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\Python38\lib\site-packages\peewee.py", line 3151, in execute_sql
self.commit()
File "C:\Python38\lib\site-packages\peewee.py", line 2917, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "C:\Python38\lib\site-packages\peewee.py", line 190, in reraise
raise value.with_traceback(tb)
File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql
cursor.execute(sql, params or ())
peewee.OperationalError: database is locked

[05/24 09:25:41] Crash saved as "crashes/Crash-2021-05-24-09-25-41.zip".
[05/24 09:25:41] Please attach this file if you gonna report the crash at
[05/24 09:25:41] https://github.com/alexal1/Insomniac/issues

[05/24 09:25:41] Close Instagram app

If you like this bot, please give us a star:
https://github.com/alexal1/Insomniac

-------- FINISH: 2021-05-24 09:25:43.175564 --------

<!-- gh-comment-id:847037060 --> @cecimascaras commented on GitHub (May 24, 2021): . **The problem continues in version 3.7.12** [Crash-2021-05-24-09-25-41.zip](https://github.com/alexal1/Insomniac/files/6532572/Crash-2021-05-24-09-25-41.zip) Caught an exception: [05/24 09:25:41] Error - database is locked Traceback (most recent call last): File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql cursor.execute(sql, params or ()) sqlite3.OperationalError: database is locked During handling of the above exception, another exception occurred: Traceback (most recent call last): File "insomniac/extra_features/session.py", line 218, in run File "D:\Insomniac-master3\insomniac\action_runners\interact\__init__.py", line 343, in run job() File "D:\Insomniac-master3\insomniac\safely_runner.py", line 19, in wrapper func(*args, **kwargs) File "D:\Insomniac-master3\insomniac\action_runners\interact\__init__.py", line 324, in job handle_target(device_wrapper.get(), File "D:\Insomniac-master3\insomniac\action_runners\interact\action_handle_target.py", line 208, in handle_target if open_user(device=device, username=target, refresh=False, deep_link_usage_percentage=50, on_action=on_action): File "D:\Insomniac-master3\insomniac\actions_impl.py", line 79, in open_user return _open_user(device, username, False, False, refresh, deep_link_usage_percentage, on_action) File "D:\Insomniac-master3\insomniac\actions_impl.py", line 622, in _open_user if not search_for(device, username=username, on_action=on_action): File "D:\Insomniac-master3\insomniac\navigation.py", line 35, in search_for target_view = search_view.navigate_to_username(username, on_action) File "D:\Insomniac-master3\insomniac\views.py", line 419, in navigate_to_username on_action(GetProfileAction(user=username)) File "D:\Insomniac-master3\insomniac\session.py", line 216, in on_action_callback self.session_state.add_action(action) File "D:\Insomniac-master3\insomniac\session_state.py", line 70, in add_action self.storage.log_get_profile_action(self.id, action.user) File "D:\Insomniac-master3\insomniac\storage.py", line 54, in wrap return func(*args, **kwargs) File "D:\Insomniac-master3\insomniac\storage.py", line 222, in log_get_profile_action self.profile.log_get_profile_action(session_id, username) File "D:\Insomniac-master3\insomniac\db_models.py", line 92, in log_get_profile_action session = SessionInfo.get(SessionInfo.id == session_id) File "C:\Python38\lib\site-packages\peewee.py", line 6438, in get return sq.get() File "C:\Python38\lib\site-packages\peewee.py", line 6884, in get return clone.execute(database)[0] File "C:\Python38\lib\site-packages\peewee.py", line 1907, in inner return method(self, database, *args, **kwargs) File "C:\Python38\lib\site-packages\peewee.py", line 1978, in execute return self._execute(database) File "C:\Python38\lib\site-packages\peewee.py", line 2150, in _execute cursor = database.execute(self) File "C:\Python38\lib\site-packages\peewee.py", line 3157, in execute return self.execute_sql(sql, params, commit=commit) File "C:\Python38\lib\site-packages\peewee.py", line 3151, in execute_sql self.commit() File "C:\Python38\lib\site-packages\peewee.py", line 2917, in __exit__ reraise(new_type, new_type(exc_value, *exc_args), traceback) File "C:\Python38\lib\site-packages\peewee.py", line 190, in reraise raise value.with_traceback(tb) File "C:\Python38\lib\site-packages\peewee.py", line 3144, in execute_sql cursor.execute(sql, params or ()) peewee.OperationalError: database is locked [05/24 09:25:41] Crash saved as "crashes/Crash-2021-05-24-09-25-41.zip". [05/24 09:25:41] Please attach this file if you gonna report the crash at [05/24 09:25:41] https://github.com/alexal1/Insomniac/issues [05/24 09:25:41] Close Instagram app If you like this bot, please give us a star: https://github.com/alexal1/Insomniac -------- FINISH: 2021-05-24 09:25:43.175564 --------
Author
Owner

@fishgrind commented on GitHub (Sep 13, 2021):

Is your start.py file located on a mounted disk? I had the same problem, moved it to the local disk and the problem was resolved for me.

<!-- gh-comment-id:918525620 --> @fishgrind commented on GitHub (Sep 13, 2021): Is your start.py file located on a mounted disk? I had the same problem, moved it to the local disk and the problem was resolved for me.
Author
Owner

@hoffiez commented on GitHub (Sep 14, 2021):

Also, try to turn off antivirus (or adjust its settings which is better). I had similar problems when my antivirus put insomniac database and some other staff into an isolated container.

<!-- gh-comment-id:918879300 --> @hoffiez commented on GitHub (Sep 14, 2021): Also, try to turn off antivirus (or adjust its settings which is better). I had similar problems when my antivirus put insomniac database and some other staff into an isolated container.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#287
No description provided.