When I ran 'makemigrations', I got this error.
{{{
File "/home/webapp/.virtualenvs/odin/lib/python3.5/site-
packages/django/db/migrations/questioner.py", line 51, in ask_initial
filenames = os.listdir(migrations_module.__path__[0])
TypeError: '_NamespacePath' object does not support indexing
}}}
I manage to fix it by editing the file
'django/db/migrations/questioner.py' line 51 from:
{{{
filenames = os.listdir(migrations_module.__path__[0])
}}}
to
{{{
filenames = os.listdir(list(migrations_module.__path__)[0])
}}}
I don't know if this is the correct solution.
--
Ticket URL: <https://code.djangoproject.com/ticket/29091>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
* severity: Normal => Release blocker
Comment:
At least one of your migrations directories doesn't have an `__init__.py`
file. This is a regression in aadd3aeb2ba3153e35bd805c80c901f289a6f333 and
a recurrence of #21868 (which was committed without a test).
--
Ticket URL: <https://code.djangoproject.com/ticket/29091#comment:1>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/9640 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29091#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"0a37ea56d05208e31ed2f29fdffca65b6d92fa2e" 0a37ea56]:
{{{
#!CommitTicketReference repository=""
revision="0a37ea56d05208e31ed2f29fdffca65b6d92fa2e"
Fixed #29091 -- Fixed makemigrations crash if migrations directory doesn't
have __init__.py.
Regression in aadd3aeb2ba3153e35bd805c80c901f289a6f333.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29091#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"834843ca4fdc474eba4457dee3d99fb9c882ca65" 834843ca]:
{{{
#!CommitTicketReference repository=""
revision="834843ca4fdc474eba4457dee3d99fb9c882ca65"
[2.0.x] Fixed #29091 -- Fixed makemigrations crash if migrations directory
doesn't have __init__.py.
Regression in aadd3aeb2ba3153e35bd805c80c901f289a6f333.
Backport of 0a37ea56d05208e31ed2f29fdffca65b6d92fa2e from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29091#comment:4>