2014-02-07 107 views
1

請求方法:GET 請求URL:http://ec2-145-28-57-102.compute-1.amazonaws.com/reports/ Django的版本:1.3.1 異常類型:導入錯誤 異常值:不能導入名稱import_by_path

不能導入名稱import_by_path

異常位置:在/ usr/Python可執行文件:/ usr/bin/python Python版本:2.6.6 Python路徑:/ python2.6/site-packages/django/contrib/formtools/wizard/storage/init .py in,line 2 Python Pathcut:

[ '在/ var/WWW /堆棧/應用程序/項目/應用程序', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', 「在/ usr/lib64下/python2.6/plat-linux2' , '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', 「的/ usr/lib64下/ python2 .6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6 /site-packages/setuptools-0.6c11-py2.6.egg-info', '/ var/www/stacks/apps /']

Traceback: 
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response 
    101.        request.path_info) 
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py" in resolve 
    252.      sub_match = pattern.resolve(new_path) 
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py" in resolve 
    250.    for pattern in self.url_patterns: 
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_url_patterns 
    279.   patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) 
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_urlconf_module 
    274.    self._urlconf_module = import_module(self.urlconf_name) 
File "/usr/lib/python2.6/site-packages/django/utils/importlib.py" in import_module 
    35.  __import__(name) 
File "/var/www/stacks/apps/project/apps/reports/urls.py" in <module> 
    8. from views import (project_report, project_report_new, CustomReportList, delete_custom_report, 
File "/var/www/stacks/apps/project/apps/reports/views.py" in <module> 
    15. from forms import PROJECTReportForm, PROJECTReportFormNew, CrossCheckForm 
File "/var/www/stacks/apps/project/apps/reports/forms.py" in <module> 
    29. from django.contrib.formtools.wizard.views import SessionWizardView 
File "/usr/lib/python2.6/site-packages/django/contrib/formtools/wizard/views.py" in <module> 
    13. from django.contrib.formtools.wizard.storage import get_storage 
File "/usr/lib/python2.6/site-packages/django/contrib/formtools/wizard/storage/__init__.py" in <module> 
    2. from django.utils.module_loading import import_by_path 

Exception Type: ImportError at /reports/ 
Exception Value: cannot import name import_by_path 

異常類型:導入錯誤在/報告/ 異常值:不能導入名稱import_by_path

回答

1

The docs狀態import_by_path是在Django 1.6新的,而這個問題提到的Django 1.3.1。也許你已經安裝了兩個版本?檢查Python路徑上的所有目錄。

相關問題