#22051: Running `makemigrations` twice in a row fails ---------------------------------+---------------------------------------- Reporter: bmispelon | Owner: andrewgodwin Type: Bug | Status: closed Component: Migrations | Version: master Severity: Release blocker | Resolution: fixed Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+----------------------------------------
Comment (by agbaid@…): Replying to [comment:6 andrewgodwin]: > I'll need more than that if I'm going to debug it - the models you used, the full error output, the Django commit hash you're working from. Does this help? {{{ from django.db import models from django.contrib.auth.models import User from datetime import date import string import random class FunStuffUser(User): address = models.CharField(max_length=256, blank=True) dob = models.DateField(default=date(1900, 1, 1)) class Music(models.Model): name = models.CharField(max_length=256) key = models.CharField(max_length=10, primary_key=True) }}} Here is the model and this is the error message I receive {{{ Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File ".\django-1.8.dev20140409113843-py3.3.egg\django\core\management\__init__.py", line 4 27, in execute_from_command_line utility.execute() File ".\django-1.8.dev20140409113843-py3.3.egg\django\core\management\__init__.py", line 4 19, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File ".\django-1.8.dev20140409113843-py3.3.egg\django\core\management\base.py", line 288, in run_from_argv self.execute(*args, **options.__dict__) File "C:\Python33\lib\site- packages\django-1.8.dev20140409113843-py3.3.egg\django\core\management\base.py", line 337, in execute output = self.handle(*args, **options) File ".\django-1.8.dev20140409113843-py3.3.egg\django\core\management\commands\makemigrati ons.py", line 99, in handle changes = autodetector.changes(graph=loader.graph, trim_to_apps=app_labels or None) File ".\django-1.8.dev20140409113843-py3.3.egg\django\db\migrations\autodetector.py", line 33, in changes changes = self._detect_changes() File ".\django-1.8.dev20140409113843-py3.3.egg\django\db\migrations\autodetector.py", line 50, in _detect_changes old_apps = self.from_state.render() File ".\django-1.8.dev20140409113843-py3.3.egg\django\db\migrations\state.py", line 52, in render raise InvalidBasesError("Cannot resolve bases for %r" % new_unrendered_models) django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<django.db.migrations.state.ModelState object at 0x0000000003A65940>] }}} -- Ticket URL: <https://code.djangoproject.com/ticket/22051#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.31e173ff250002f15ca4c08a69be3527%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.