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 22577,The makemigrations management command has a problem with migrations dir,japrogramer@…,Vidir Valberg Gudmundsson,"When the migration folder does not have an init http://codepad.org/U2nGptor {{{ File ""/home/archie/git/django/django/db/migrations/writer.py"", line 150, in path basedir = os.path.dirname(migrations_module.__file__) AttributeError: 'module' object has no attribute '__file__' }}} the problem lies with `makemigrations.py` line 134-36 they are checking to see if an init file exists in the migrations dir but it checks using a line that depends on the existence of `__init__.py`. line 130 , `writer.path`, following to see where this code comes from led me to line 149 and 150 which need there to be an init file for `__file__` to be an attribute there .. tl;dr `makemigrations` checks for an init file using `os.path.isdir` but with a call that depends on an `__init__.py` for it treats it as a module before it knows if it is a module",Bug,closed,Migrations,dev,Release blocker,fixed,"makemigrations, fail, init, file",,Accepted,1,0,0,0,0,0