﻿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
25246	Python 3 error in runserver when a directory is missing __init__.py	Jessamyn Smith	Caio Ariede	"Using Python 3.4.2
One app directory is missing a number of files, including __init__.py
This results in an error when trying to run any manage.py command.
It seems odd that the app directory is showing up multiple times in the path, and that duplication seems to cause issues for Django.

Here is an example traceback:

{{{
(testenv)~/Development/testenv-dev/testenv$ python manage.py runserver
Traceback (most recent call last):
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/apps/config.py"", line 100, in create
    entry = module.default_app_config
AttributeError: 'module' object has no attribute 'default_app_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ""manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/core/management/__init__.py"", line 385, in execute_from_command_line
    utility.execute()
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/core/management/__init__.py"", line 354, in execute
    django.setup()
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/__init__.py"", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/apps/registry.py"", line 85, in populate
    app_config = AppConfig.create(entry)
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/apps/config.py"", line 103, in create
    return cls(entry, module)
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/apps/config.py"", line 41, in __init__
    self.path = self._path_from_module(app_module)
  File ""/Users/jessamyn/.virtualenvs/testenv/lib/python3.4/site-packages/django/apps/config.py"", line 70, in _path_from_module
    ""with a 'path' class attribute."" % (module, paths))
django.core.exceptions.ImproperlyConfigured: The app module <module 'emptyapp' (namespace)> has multiple filesystem locations (['/Users/jessamyn/Development/testenv-dev/testenv/emptyapp', '/Users/jessamyn/Development/testenv-dev/testenv/emptyapp', '/Users/jessamyn/Development/testenv-dev/testenv/emptyapp']); you must configure this app with an AppConfig subclass with a 'path' class attribute.
}}}"	Bug	closed	Core (Other)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
