Django在应用迁移时给出堆栈溢出错误

时间:2019-05-25 21:11:14

标签: python django python-3.x django-models django-migrations

对于这个非常用例,我大约有150张桌子。我制作了一个包含“ apps”的模型文件夹,每个文件夹中都包含模型。进行迁移没有问题。应用它们,我得到这个错误:

Operations to perform:
  Apply all migrations: admin, auth, contenttypes, public, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying public.0001_initial... OK
  Applying public.0002_auto_20190525_1519... OK
  Applying public.0003_auto_20190525_1519... OK
Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00000f70 (most recent call first):
  File "c:\users\yoom\appdata\local\programs\python\python37-32\Lib\contextlib.py", line 130 in __exit__
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\state.py", line 318 in render_multiple
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\state.py", line 191 in _reload
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\state.py", line 158 in reload_model
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\operations\models.py", line 739 in state_forwards
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\migration.py", line 114 in apply
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\executor.py", line 245 in apply_migration
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\executor.py", line 147 in _migrate_all_forwards
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\db\migrations\executor.py", line 117 in migrate
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\commands\migrate.py", line 234 in handle
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\base.py", line 83 in wrapped
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\base.py", line 364 in execute
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\base.py", line 323 in run_from_argv
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\__init__.py", line 375 in execute
  File "C:\Users\yoom\Code\test\testvenv\lib\site-packages\django\core\management\__init__.py", line 381 in execute_from_command_line
  File "manage.py", line 17 in main
  File "manage.py", line 21 in <module>

有人可以描述为什么我会收到此错误并建议我可以做什么吗?还剩50张桌子

0 个答案:

没有答案