chroblert / AssetManage

278 stars 97 forks source link

python manage.py makemigrations 迁移时候提示这个错误是? #3

Closed yq513 closed 4 years ago

yq513 commented 4 years ago

Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/opt/py3/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/opt/py3/lib/python3.6/site-packages/django/core/management/init.py", line 357, in execute django.setup() File "/opt/py3/lib/python3.6/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/py3/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/opt/py3/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/opt/py3/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/opt/py3/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in class AbstractBaseUser(models.Model): File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 117, in new new_class.add_to_class('_meta', Options(meta, app_label)) File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 321, in add_to_class value.contribute_to_class(cls, name) File "/opt/py3/lib/python3.6/site-packages/django/db/models/options.py", line 204, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) File "/opt/py3/lib/python3.6/site-packages/django/db/init.py", line 28, in getattr return getattr(connections[DEFAULT_DB_ALIAS], item) File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py", line 201, in getitem backend = load_backend(db['ENGINE']) File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py", line 110, in load_backend return import_module('%s.base' % backend_name) File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/py3/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 66, in check_sqlite_version() File "/opt/py3/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 63, in check_sqlite_version raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version) django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

chroblert commented 4 years ago

Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/opt/py3/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line utility.execute() File "/opt/py3/lib/python3.6/site-packages/django/core/management/init.py", line 357, in execute django.setup() File "/opt/py3/lib/python3.6/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/py3/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate app_config.import_models() File "/opt/py3/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models self.models_module = import_module(models_module_name) File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/opt/py3/lib/python3.6/site-packages/django/contrib/auth/models.py", line 2, in from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/opt/py3/lib/python3.6/site-packages/django/contrib/auth/base_user.py", line 47, in class AbstractBaseUser(models.Model): File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 117, in new new_class.add_to_class('_meta', Options(meta, app_label)) File "/opt/py3/lib/python3.6/site-packages/django/db/models/base.py", line 321, in add_to_class value.contribute_to_class(cls, name) File "/opt/py3/lib/python3.6/site-packages/django/db/models/options.py", line 204, in contribute_to_class self.db_table = truncate_name(self.db_table, connection.ops.max_name_length()) File "/opt/py3/lib/python3.6/site-packages/django/db/init.py", line 28, in getattr return getattr(connections[DEFAULT_DB_ALIAS], item) File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py", line 201, in getitem backend = load_backend(db['ENGINE']) File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py", line 110, in load_backend return import_module('%s.base' % backend_name) File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/py3/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 66, in check_sqlite_version() File "/opt/py3/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py", line 63, in check_sqlite_version raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version) django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

这个对sqlite3的版本有要求的,我在https://github.com/chroblert/SecurityBaselineCheck的Readme.md中参考资料中帖了个链接,可以参考这个进行处理 https://cloud.tencent.com/developer/article/1439327