mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 09:06:02 +03:00
[GH-ISSUE #880] Question: ...Unable to create the django_migrations table (database is locked) #544
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#544
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tunloop on GitHub (Oct 23, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/880
Can anyone help me with this error?
$ archivebox init --setup
[i] [2021-10-23 03:51:34] ArchiveBox v0.6.2: archivebox init --setup
> /media/WebArchive
[^] Verifying and updating existing ArchiveBox collection to v0.6.2...
----------------------------------------------------------------------
[*] Verifying archive folder structure...
+ ./archive, ./sources, ./logs...
+ ./ArchiveBox.conf...
[*] Verifying main SQL index and running any migrations needed...
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 242, in _commit
return self.connection.commit()
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/recorder.py", line 68, in ensure_schema
editor.create_model(self.Migration)
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/sqlite3/schema.py", line 36, in exit
super().exit(exc_type, exc_value, traceback)
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/schema.py", line 117, in exit
self.atomic.exit(exc_type, exc_value, traceback)
File "/usr/local/lib/python3.9/dist-packages/django/db/transaction.py", line 232, in exit
connection.commit()
File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 266, in commit
self._commit()
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 242, in _commit
return self.connection.commit()
File "/usr/local/lib/python3.9/dist-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 242, in _commit
return self.connection.commit()
django.db.utils.OperationalError: database is locked
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/archivebox", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/archivebox/cli/init.py", line 140, in main
run_subcommand(
File "/usr/local/lib/python3.9/dist-packages/archivebox/cli/init.py", line 80, in run_subcommand
module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore
File "/usr/local/lib/python3.9/dist-packages/archivebox/cli/archivebox_init.py", line 43, in main
init(
File "/usr/local/lib/python3.9/dist-packages/archivebox/util.py", line 114, in typechecked_function
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/archivebox/main.py", line 328, in init
for migration_line in apply_migrations(out_dir):
File "/usr/local/lib/python3.9/dist-packages/archivebox/util.py", line 114, in typechecked_function
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/archivebox/index/sql.py", line 138, in apply_migrations
call_command("migrate", interactive=False, stdout=out)
File "/usr/local/lib/python3.9/dist-packages/django/core/management/init.py", line 168, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.9/dist-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.9/dist-packages/django/core/management/base.py", line 85, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/django/core/management/commands/migrate.py", line 243, in handle
post_migrate_state = executor.migrate(
File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/executor.py", line 91, in migrate
self.recorder.ensure_schema()
File "/usr/local/lib/python3.9/dist-packages/django/db/migrations/recorder.py", line 70, in ensure_schema
raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked)
@tunloop commented on GitHub (Oct 23, 2021):
Disregard, solved the problem by adding nobrl option to cifs smb mount
@pirate commented on GitHub (Apr 12, 2022):
Note I've added a new DB/filesystem troubleshooting area to the wiki that may help people arriving here from Google: https://github.com/ArchiveBox/ArchiveBox/wiki/Upgrading-or-Merging-Archives#database-troubleshooting
Contributions/suggestions welcome there.
archivebox update --index-onlydoesn't upgrade Snapshotindex.{html,json}files #600--index-onlyon the update command ? #1854archivebox update --index-onlydoesn't upgrade Snapshotindex.{html,json}files #2108--index-onlyon the update command ? #3365archivebox update --index-onlydoesn't upgrade Snapshotindex.{html,json}files #3620