Django 1.7 makemigrations卡住了

时间:2015-03-25 22:55:37

标签: django django-models django-south django-migrations

我正在尝试manage.py makemigrations并且它在命令行上被卡住并且没有信息25分钟。 我最后做了Ctrl + C,这是我得到的堆栈跟踪:

manage.py makemigrations
^CTraceback (most recent call last):
  File "./manage.py", line 16, in <module>
    execute_from_command_line(cmd)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/makemigrations.py", line 89, in handle
    loader.project_state(),
  File "/Library/Python/2.7/site-packages/django/db/migrations/loader.py", line 272, in project_state
    return self.graph.make_state(nodes=nodes, at_end=at_end, real_apps=list(self.unmigrated_apps))
  File "/Library/Python/2.7/site-packages/django/db/migrations/graph.py", line 223, in make_state
    project_state = self.nodes[node].mutate_state(project_state)
  File "/Library/Python/2.7/site-packages/django/db/migrations/migration.py", line 74, in mutate_state
    new_state = project_state.clone()
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", line 38, in clone
    models=dict((k, v.clone()) for k, v in self.models.items()),
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", line 38, in <genexpr>
    models=dict((k, v.clone()) for k, v in self.models.items()),
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", line 289, in clone
    fields=list(self.construct_fields()),
  File "/Library/Python/2.7/site-packages/django/db/migrations/state.py", line 280, in construct_fields
    _, path, args, kwargs = field.deconstruct()
  File "/Library/Python/2.7/site-packages/django/db/models/fields/related.py", line 1663, in deconstruct
    name, path, args, kwargs = super(ForeignKey, self).deconstruct()
  File "/Library/Python/2.7/site-packages/django/db/models/fields/related.py", line 1375, in deconstruct
    name, path, args, kwargs = super(ForeignObject, self).deconstruct()
  File "/Library/Python/2.7/site-packages/django/db/models/fields/__init__.py", line 354, in deconstruct
    if name == "choices" and isinstance(value, collections.Iterable):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/abc.py", line 131, in __instancecheck__
    subclass = getattr(instance, '__class__', None)
KeyboardInterrupt
^C

0 个答案:

没有答案