[GH-ISSUE #728] Bug: Django 3.2 default auto fields must subclass AutoField #1972

Closed
opened 2026-03-01 17:55:27 +03:00 by kerem · 4 comments
Owner

Originally created by @fran-penedo on GitHub (May 1, 2021).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/728

Describe the bug

Version 0.6.2 is incompatible with Django 3.2. Archivebox breaks with the following exception:

ValueError: Primary key 'django.db.models.UUIDField' referred by core.apps.CoreConfig.default_auto_field must subclass AutoField.

This bug report in Django seems related.

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-5.11.15-arch1-2-x86_64-with-glibc2.33 x86_64
IN_DOCKER=False DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.2          valid     /usr/bin/archivebox                                                         
 √  PYTHON_BINARY         v3.9.3          valid     /usr/bin/python3.9                                                          
 √  DJANGO_BINARY         v3.2-1          valid     /usr/lib/python3.9/site-packages/django/bin/django-admin.py                 
 √  CURL_BINARY           v7.76.1         valid     /usr/bin/curl                                                               
 -  WGET_BINARY           -               disabled  /usr/bin/wget                                                               
 √  NODE_BINARY           v15.14.0        valid     /usr/bin/node                                                               
 √  SINGLEFILE_BINARY     v0.3.11         valid     /opt/single-file/cli/single-file                                            
 -  READABILITY_BINARY    -               disabled  /usr/lib/node_modules/readability-extractor/readability-extractor           
 -  MERCURY_BINARY        -               disabled  /usr/lib/node_modules/@postlight/mercury-parser/cli.js                      
 -  GIT_BINARY            -               disabled  /usr/bin/git                                                                
 -  YOUTUBEDL_BINARY      -               disabled  /usr/bin/youtube-dl                                                         
 √  CHROME_BINARY         v90.0.4430.72   valid     /usr/bin/chromium                                                           
 √  RIPGREP_BINARY        v12.1.1         valid     /usr/bin/rg                                                                 

[i] Source-code locations:
 √  PACKAGE_DIR           23 files        valid     /usr/lib/python3.9/site-packages/archivebox                                 
 √  TEMPLATES_DIR         3 files         valid     /usr/lib/python3.9/site-packages/archivebox/templates                       
 -  CUSTOM_TEMPLATES_DIR  -               disabled                                                                              

[i] Secrets locations:
 √  CHROME_USER_DATA_DIR  33 files        valid     /home/fran/.config/chromium                                                 
 -  COOKIES_FILE          -               disabled                                                                              

[i] Data locations:
 √  OUTPUT_DIR            7 files         valid     /home/fran/archivebox                                                       
 √  SOURCES_DIR           59 files        valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           5792 files      valid     ./archive                                                                   
 √  CONFIG_FILE           812.0 Bytes     valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             39.1 MB         valid     ./index.sqlite3                                                             
Originally created by @fran-penedo on GitHub (May 1, 2021). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/728 #### Describe the bug Version 0.6.2 is incompatible with Django 3.2. Archivebox breaks with the following exception: ``` ValueError: Primary key 'django.db.models.UUIDField' referred by core.apps.CoreConfig.default_auto_field must subclass AutoField. ``` [This bug report in Django seems related](https://code.djangoproject.com/ticket/32577). #### ArchiveBox version ```logs ArchiveBox v0.6.2 Cpython Linux Linux-5.11.15-arch1-2-x86_64-with-glibc2.33 x86_64 IN_DOCKER=False DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep [i] Dependency versions: √ ARCHIVEBOX_BINARY v0.6.2 valid /usr/bin/archivebox √ PYTHON_BINARY v3.9.3 valid /usr/bin/python3.9 √ DJANGO_BINARY v3.2-1 valid /usr/lib/python3.9/site-packages/django/bin/django-admin.py √ CURL_BINARY v7.76.1 valid /usr/bin/curl - WGET_BINARY - disabled /usr/bin/wget √ NODE_BINARY v15.14.0 valid /usr/bin/node √ SINGLEFILE_BINARY v0.3.11 valid /opt/single-file/cli/single-file - READABILITY_BINARY - disabled /usr/lib/node_modules/readability-extractor/readability-extractor - MERCURY_BINARY - disabled /usr/lib/node_modules/@postlight/mercury-parser/cli.js - GIT_BINARY - disabled /usr/bin/git - YOUTUBEDL_BINARY - disabled /usr/bin/youtube-dl √ CHROME_BINARY v90.0.4430.72 valid /usr/bin/chromium √ RIPGREP_BINARY v12.1.1 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 23 files valid /usr/lib/python3.9/site-packages/archivebox √ TEMPLATES_DIR 3 files valid /usr/lib/python3.9/site-packages/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled [i] Secrets locations: √ CHROME_USER_DATA_DIR 33 files valid /home/fran/.config/chromium - COOKIES_FILE - disabled [i] Data locations: √ OUTPUT_DIR 7 files valid /home/fran/archivebox √ SOURCES_DIR 59 files valid ./sources √ LOGS_DIR 1 files valid ./logs √ ARCHIVE_DIR 5792 files valid ./archive √ CONFIG_FILE 812.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 39.1 MB valid ./index.sqlite3 ```
kerem closed this issue 2026-03-01 17:55:27 +03:00
Author
Owner

@pirate commented on GitHub (May 3, 2021):

ArchiveBox only supports Django>=3, <3.2. There are several issues with 3.2 besides this one. You'll have to downgrade to 3.1.x.

pip3 install django==3.1.9

<!-- gh-comment-id:831503017 --> @pirate commented on GitHub (May 3, 2021): ArchiveBox only supports Django>=3, <3.2. There are several issues with 3.2 besides this one. You'll have to downgrade to 3.1.x. `pip3 install django==3.1.9`
Author
Owner

@milahu commented on GitHub (Feb 3, 2024):

same error with django 4.2.9

see also #988

<!-- gh-comment-id:1925293941 --> @milahu commented on GitHub (Feb 3, 2024): same error with django 4.2.9 see also #988
Author
Owner

@milahu commented on GitHub (Feb 3, 2024):

draft fix in https://github.com/milahu/archivebox/tree/django4

<!-- gh-comment-id:1925307925 --> @milahu commented on GitHub (Feb 3, 2024): draft fix in https://github.com/milahu/archivebox/tree/django4
Author
Owner

@milahu commented on GitHub (Feb 3, 2024):

related https://github.com/django/django/pull/17815

django.db.utils.OperationalError: no such column: django_migrations.id

<!-- gh-comment-id:1925323713 --> @milahu commented on GitHub (Feb 3, 2024): related https://github.com/django/django/pull/17815 > django.db.utils.OperationalError: no such column: django_migrations.id
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/ArchiveBox#1972
No description provided.