AttributeError'module'对象没有属性'__path__'django

时间:2014-06-25 05:42:38

标签: python django

我收到错误" AttributeError'模块'对象没有属性' 路径'" 我使用的是django == 1.3,python == 2.7 应用程序是在django == 1.3

中开发的

错误strace:

Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "d:\ecenv\lib\site-packages\django\core\management\__init__.py", line 438
, in execute_manager
    utility.execute()
  File "d:\ecenv\lib\site-packages\django\core\management\__init__.py", line 379
, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "d:\ecenv\lib\site-packages\django\core\management\base.py", line 191, in
 run_from_argv
    self.execute(*args, **options.__dict__)
  File "d:\ecenv\lib\site-packages\django\core\management\base.py", line 219, in
 execute
    self.validate()
  File "d:\ecenv\lib\site-packages\django\core\management\base.py", line 249, in
 validate
    num_errors = get_validation_errors(s, app)
  File "d:\ecenv\lib\site-packages\django\core\management\validation.py", line 3
6, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "d:\ecenv\lib\site-packages\django\db\models\loading.py", line 146, in ge
t_app_errors
    self._populate()
  File "d:\ecenv\lib\site-packages\django\db\models\loading.py", line 61, in _po
pulate
    self.load_app(app_name, True)
  File "d:\ecenv\lib\site-packages\django\db\models\loading.py", line 83, in loa
d_app
    if not module_has_submodule(app_module, 'models'):
  File "d:\ecenv\lib\site-packages\django\utils\module_loading.py", line 17, in
module_has_submodule
    for entry in package.__path__:  # No __path__, then not a package.
AttributeError: 'module' object has no attribute '__path__'
(ecenv)

我正在使用虚拟envoirement&#34; ecenv&#34;其中django == 1.3安装。 请帮助我以前这个应用程序工作正常。

1 个答案:

答案 0 :(得分:0)

virtualenv中的Django版本应该与外部(完全)相同(你的项目工作正常)。

这是您的错误,已在1.5 https://code.djangoproject.com/ticket/13603

中修复