﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29091	makemigrations crashes if a migration directory doesn't have an __init__.py	Rafael Lott	nobody	"I upgraded from Django 1.11 to Django 2.0.

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."	Bug	closed	Migrations	2.0	Release blocker	fixed			Accepted	1	0	0	0	0	0
