Opened 5 years ago

Closed 5 years ago

#22243 closed Uncategorized (invalid)

migrate raises IndexError when getting parent from self.graph

Reported by: mszamot@… Owned by: nobody
Component: Migrations Version: master
Severity: Normal Keywords:
Cc: mszamot@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Aymeric Augustin)

After deleting south migrations (I move from Django 1.6) and using ./ makemigrations the ./ migrate raises an error. Here is the full traceback:

Traceback (most recent call last):
  File "./", line 7, in <module>
  File "/home/coot/webapps/social_feel/venv/src/django/django/core/management/", line 427, in execute_from_command_line
  File "/home/coot/webapps/social_feel/venv/src/django/django/core/management/", line 419, in execute
  File "/home/coot/webapps/social_feel/venv/src/django/django/core/management/", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/coot/webapps/social_feel/venv/src/django/django/core/management/", line 337, in execute
    output = self.handle(*args, **options)
  File "/home/coot/webapps/social_feel/venv/src/django/django/core/management/commands/", line 62, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/", line 14, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/", line 48, in __init__
  File "/home/coot/webapps/social_feel/venv/src/django/django/db/migrations/", line 229, in build_graph
    parent = list(self.graph.root_nodes(parent[0]))[0]
IndexError: list index out of range

Change History (3)

comment:1 Changed 5 years ago by Andrew Godwin

Have you make sure all the files in the migrations directory are gone, even the .pyc files? Can you give me an example of the commands you ran as a console session with output included?

comment:2 Changed 5 years ago by Marcin Szamotulski <mszamot@…>

Yes I did removed pyc files as well, and I used ./ makemigrations; ./ migrate; I found out that the problem was laying in migrations of an external app I am using (taggit). I think this ticket can be closed.

comment:3 Changed 5 years ago by Aymeric Augustin

Description: modified (diff)
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top