CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 11:26:28 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=253.888928,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=736.188432,issue_conversation_sidebar-fragment;desc="issue_conversation_sidebar fragment";dur=53.343872,nginx;desc="NGINX";dur=1.616258,glb;desc="GLB";dur=100.544168
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: fd8fbbc
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=MeuPoutOTg%2BuR9IxyeAL%2F6bAPkayQ%2F9E6aGKrhCYyRSlAsfOvngW6FN6ibTpGiHm7dAlSyo4YW0IUspb%2FUGhAYOM1dbEl1YrFRPTg0q6Bv7GBpqy%2FqMIO55xH%2BWotIuLDeSnKqXp9NwQk3RI%2F2syTAt5KNZujro86QJXTpkv2BJi7s0iJaDq2JFG9AAA%2FkPUfuC2BJSuFIj7UGbeT4s26JWISjzdiTt1E%2FYoeH1DX24n1ZtctSvky2jJsM9nDlOzYA6%2BrO3RKnpJM%2FEmU64NvQ%3D%3D--rz1jQIIEGYyKgrbI--pDoTMct08o8yJYepLovsBg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.345262081.1753356388; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 11:26:28 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 11:26:28 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9460:0A76:9B1B57:B98C8D:68821864
Bugfix: django.db.utils.IntegrityError: UNIQUE constraint failed: core_snapshot.timestamp · Issue #412 · ArchiveBox/ArchiveBox · GitHub
No projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
size: mediumstatus: wipWork is in-progress / has already been partially completedWork is in-progress / has already been partially completedtouches: data/schema/architecture
Description
Describe the bug
Y'all helped me with upgrading my super old archive to the django branch before official 0.4.9 release. I recently upgraded to the newest version, so I could start adding links. archivebox said I had to re-init. archivebox init
gives me following error, and will not let me add new links.
django.db.utils.IntegrityError: UNIQUE constraint failed: core_snapshot.timestamp
Full log/error below.
Steps to reproduce
git checkout master
to switch from django branch.git pull origin master
to pull new release.pip install -e .
(also tried withpip uninstall archivebox && pip install .
)- Navigate to archivebox-output directory.
- Run
archivebox init
. - error.
Screenshots or log output
[i] [2020-07-31 17:34:44] ArchiveBox v0.4.9: archivebox init
> /.archivebox-output/archive-working
[*] Updating existing ArchiveBox collection in this folder...
/.archivebox-output/archive-working
------------------------------------------------------------------
[*] Verifying archive folder structure...
√ /.archivebox-output/archive-working/sources
√ /.archivebox-output/archive-working/archive
√ /.archivebox-output/archive-working/logs
√ /.archivebox-output/archive-working/ArchiveBox.conf
[*] Verifying main SQL index and running migrations...
√ /.archivebox-output/archive-working/index.sqlite3
Operations to perform:
Apply all migrations: admin, auth, contenttypes, core, sessions
Running migrations:
Applying core.0005_auto_20200728_0326... OK
[*] Collecting links from any existing indexes and archive folders...
√ Loaded 1376 links from existing main index.
√ Added 347 orphaned links from existing archive directories.
! Skipped adding 239 invalid link data directories.
X /* SNIP A BUNCH OF BROKEN ARCHIVES /*
Hint: For more information about the link data directories that were skipped, run:
archivebox status
archivebox list --status=invalid
[*] [2020-07-31 18:01:50] Writing 1723 links to main index...
Traceback (most recent call last):
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 575, in update_or_create
obj = self.select_for_update().get(**kwargs)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 417, in get
self.model._meta.object_name
core.models.DoesNotExist: Snapshot matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.IntegrityError: UNIQUE constraint failed: core_snapshot.timestamp
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/USERNAME/.local/bin/archivebox", line 33, in <module>
sys.exit(load_entry_point('archivebox', 'console_scripts', 'archivebox')())
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/cli/__init__.py", line 126, in main
pwd=pwd or OUTPUT_DIR,
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/cli/__init__.py", line 62, in run_subcommand
module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/cli/archivebox_init.py", line 35, in main
out_dir=pwd or OUTPUT_DIR,
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/util.py", line 109, in typechecked_function
return func(*args, **kwargs)
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/main.py", line 369, in init
write_main_index(list(all_links.values()), out_dir=out_dir)
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/util.py", line 109, in typechecked_function
return func(*args, **kwargs)
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/index/__init__.py", line 235, in write_main_index
write_sql_main_index(links, out_dir=out_dir)
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/util.py", line 109, in typechecked_function
return func(*args, **kwargs)
File "/home/USERNAME/datahoard/ArchiveBox/archivebox/index/sql.py", line 42, in write_sql_main_index
Snapshot.objects.update_or_create(url=link.url, defaults=info)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 580, in update_or_create
obj, created = self._create_object_from_params(kwargs, params, lock=True)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 604, in _create_object_from_params
raise e
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 596, in _create_object_from_params
obj = self.create(**params)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 433, in create
obj.save(force_insert=True, using=self.db)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/base.py", line 746, in save
force_update=force_update, update_fields=update_fields)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/base.py", line 784, in save_base
force_update, using, update_fields,
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/base.py", line 887, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/base.py", line 926, in _do_insert
using=using, raw=raw,
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/query.py", line 1204, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1392, in execute_sql
cursor.execute(sql, params)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
File "/home/USERNAME/.local/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: UNIQUE constraint failed: core_snapshot.timestamp
Software versions
- OS: Ubuntu 18.04
- ArchiveBox version: 0.4.9 (0ac4e12)
- Python version: Python 3.7.8
Metadata
Metadata
Assignees
Labels
size: mediumstatus: wipWork is in-progress / has already been partially completedWork is in-progress / has already been partially completedtouches: data/schema/architecture
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.