ansiblebook / mezzanine_example

9 stars 50 forks source link

Error in migrate command #5

Open tshadrin opened 10 months ago

tshadrin commented 10 months ago

Hi, I'm getting an error in migrate command:

TASK [Apply migrations to create the database, collect static content] **** failed: [ans] (item=migrate) => {"ansible_loop_var": "item", "changed": false, "cmd": ["./manage.py", "migrate", "--noinput"], "item": "migrate", "msg": "\n:stderr: Traceback (most recent call last):\n File \"./manage.py\", line 14, in \n execute_from_command_line(sys.argv)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/core/management/init.py\", line 367, in execute_from_command_line\n utility.execute()\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/core/management/init.py\", line 341, in execute\n django.setup()\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/init.py\", line 27, in setup\n apps.populate(settings.INSTALLED_APPS)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/apps/registry.py\", line 108, in populate\n app_config.import_models(all_models)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/apps/config.py\", line 199, in import_models\n self.models_module = import_module(models_module_name)\n File \"/usr/lib/python3.8/importlib/init.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"\", line 1014, in _gcd_import\n File \"\", line 991, in _find_and_load\n File \"\", line 975, in _find_and_load_unlocked\n File \"\", line 671, in _load_unlocked\n File \"\", line 848, in exec_module\n File \"\", line 219, in _call_with_frames_removed\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/contrib/auth/models.py\", line 4, in \n from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/contrib/auth/base_user.py\", line 52, in \n class AbstractBaseUser(models.Model):\nRuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new?\n", "path": "/root/.virtualenvs/mezzanine_example/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", "syspath": ["/tmp/ansible_django_manage_payload_ugm5qsu4/ansible_django_manage_payload.zip", "/usr/lib/python38.zip", "/usr/lib/python3.8", "/usr/lib/python3.8/lib-dynload", "/usr/local/lib/python3.8/dist-packages", "/usr/lib/python3/dist-packages"]} failed: [ans] (item=collectstatic) => {"ansible_loop_var": "item", "changed": false, "cmd": ["./manage.py", "collectstatic", "--noinput"], "item": "collectstatic", "msg": "\n:stderr: Traceback (most recent call last):\n File \"./manage.py\", line 14, in \n execute_from_command_line(sys.argv)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/core/management/init.py\", line 367, in execute_from_command_line\n utility.execute()\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/core/management/init.py\", line 341, in execute\n django.setup()\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/init.py\", line 27, in setup\n apps.populate(settings.INSTALLED_APPS)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/apps/registry.py\", line 108, in populate\n app_config.import_models(all_models)\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/apps/config.py\", line 199, in import_models\n self.models_module = import_module(models_module_name)\n File \"/usr/lib/python3.8/importlib/init.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"\", line 1014, in _gcd_import\n File \"\", line 991, in _find_and_load\n File \"\", line 975, in _find_and_load_unlocked\n File \"\", line 671, in _load_unlocked\n File \"\", line 848, in exec_module\n File \"\", line 219, in _call_with_frames_removed\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/contrib/auth/models.py\", line 4, in \n from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager\n File \"/root/.virtualenvs/mezzanine_example/lib/python3.8/site-packages/django/contrib/auth/base_user.py\", line 52, in \n class AbstractBaseUser(models.Model):\nRuntimeError: class not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was classcell propagated to type.new?\n", "path": "/root/.virtualenvs/mezzanine_example/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin", "syspath": ["/tmp/ansible_django_manage_payload_6p48xu1x/ansible_django_manage_payload.zip", "/usr/lib/python38.zip", "/usr/lib/python3.8", "/usr/lib/python3.8/lib-dynload", "/usr/local/lib/python3.8/dist-packages", "/usr/lib/python3/dist-packages"]}

please update repo

azbuka827 commented 9 months ago

Hi, do you have some solution, i have same issue.