Python Django错误代码可以';我想不出是什么问题

Python Django错误代码可以';我想不出是什么问题,python,django,tastypie,Python,Django,Tastypie,我得到了下面的堆栈,无法找出问题所在。 我知道这与我的url有关。pi我正在尝试创建一个美味的馅饼url来设置Restfull服务 ImportError: importlib._bootstrap is not a frozen module Traceback (most recent call last): File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 339, in ur

我得到了下面的堆栈,无法找出问题所在。 我知道这与我的url有关。pi我正在尝试创建一个美味的馅饼url来设置Restfull服务

ImportError: importlib._bootstrap is not a frozen module
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 339, in urlconf_module
    return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 101, in get_response
    resolver_match = resolver.resolve(request.path_info)
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 318, in resolve
    for pattern in self.url_patterns:
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 346, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 341, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python3.3/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/home/Cmaden/cmsite/cmsite/urls.py", line 4, in <module>
    from myarticle.api import ArticleResource
  File "/home/Cmaden/cmsite/myarticle/api.py", line 1, in <module>
    from tastypie.resources import ModelResource
  File "/home/Cmaden/.local/lib/python3.3/site-packages/django_tastypie-0.11.1-py3.3.egg/tastypie/resources.py", line 1742, in <module>
    class BaseModelResource(Resource):
  File "/home/Cmaden/.local/lib/python3.3/site-packages/django_tastypie-0.11.1-py3.3.egg/tastypie/resources.py", line 2212, in BaseModelResource
    @transaction.commit_on_success()
  File "/usr/local/lib/python3.3/dist-packages/django/db/transaction.py", line 448, in commit_on_success
    PendingDeprecationWarning, stacklevel=2)
PendingDeprecationWarning: commit_on_success is deprecated in favor of atomic.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/user_wsgi_wrapper.py", line 67, in __call__
    self.error_log_file.logger.exception("Error running WSGI application")
  File "/usr/lib/python3.3/logging/__init__.py", line 1269, in exception
    self.error(msg, *args, **kwargs)
  File "/usr/lib/python3.3/logging/__init__.py", line 1262, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.3/logging/__init__.py", line 1368, in _log
    self.handle(record)
  File "/usr/lib/python3.3/logging/__init__.py", line 1377, in handle
    if (not self.disabled) and self.filter(record):
  File "/usr/lib/python3.3/logging/__init__.py", line 687, in filter
    for f in self.filters:
  File "/bin/user_wsgi_wrapper.py", line 59, in __call__
    app_iterator = self.app(environ, start_response)
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 196, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 231, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 69, in technical_500_response
    html = reporter.get_traceback_html()
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 323, in get_traceback_html
    c = Context(self.get_traceback_data())
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 281, in get_traceback_data
    frames = self.get_traceback_frames()
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 428, in get_traceback_frames
    pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file(filename, lineno, 7, loader, module_name)
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 379, in _get_lines_from_file
    source = loader.get_source(module_name)
  File "<frozen importlib._bootstrap>", line 605, in _requires_frozen_wrapper
ImportError: importlib._bootstrap is not a frozen module
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 339, in urlconf_module
    return self._urlconf_module
AttributeError: 'RegexURLResolver' object has no attribute '_urlconf_module'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 90, in get_response
    response = middleware_method(request)
  File "/usr/local/lib/python3.3/dist-packages/django/middleware/common.py", line 71, in process_request
    if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 573, in is_valid_path
    resolve(path, urlconf)
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 453, in resolve
    return get_resolver(urlconf).resolve(path)
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 318, in resolve
    for pattern in self.url_patterns:
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 346, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py", line 341, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python3.3/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "/home/Cmaden/cmsite/cmsite/urls.py", line 4, in <module>
    from myarticle.api import ArticleResource
  File "/home/Cmaden/cmsite/myarticle/api.py", line 1, in <module>
    from tastypie.resources import ModelResource
  File "/home/Cmaden/.local/lib/python3.3/site-packages/django_tastypie-0.11.1-py3.3.egg/tastypie/resources.py", line 1742, in <module>
    class BaseModelResource(Resource):
  File "/home/Cmaden/.local/lib/python3.3/site-packages/django_tastypie-0.11.1-py3.3.egg/tastypie/resources.py", line 2212, in BaseModelResource
    @transaction.commit_on_success()
  File "/usr/local/lib/python3.3/dist-packages/django/db/transaction.py", line 448, in commit_on_success
    PendingDeprecationWarning, stacklevel=2)
PendingDeprecationWarning: commit_on_success is deprecated in favor of atomic.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/user_wsgi_wrapper.py", line 67, in __call__
    self.error_log_file.logger.exception("Error running WSGI application")
  File "/usr/lib/python3.3/logging/__init__.py", line 1269, in exception
    self.error(msg, *args, **kwargs)
  File "/usr/lib/python3.3/logging/__init__.py", line 1262, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.3/logging/__init__.py", line 1368, in _log
    self.handle(record)
  File "/usr/lib/python3.3/logging/__init__.py", line 1377, in handle
    if (not self.disabled) and self.filter(record):
  File "/usr/lib/python3.3/logging/__init__.py", line 687, in filter
    for f in self.filters:
  File "/bin/user_wsgi_wrapper.py", line 59, in __call__
    app_iterator = self.app(environ, start_response)
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 196, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py", line 231, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 69, in technical_500_response
    html = reporter.get_traceback_html()
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 323, in get_traceback_html
    c = Context(self.get_traceback_data())
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 281, in get_traceback_data
    frames = self.get_traceback_frames()
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 428, in get_traceback_frames
    pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file(filename, lineno, 7, loader, module_name)
  File "/usr/local/lib/python3.3/dist-packages/django/views/debug.py", line 379, in _get_lines_from_file
    source = loader.get_source(module_name)
  File "<frozen importlib._bootstrap>", line 605, in _requires_frozen_wrapper
ImportError: importlib._bootstrap is not a frozen module
ImportError:importlib.\u引导程序不是冻结的模块
回溯(最近一次呼叫最后一次):
urlconf_模块中的文件“/usr/local/lib/python3.3/dist packages/django/core/urlresolvers.py”,第339行
返回self.\u urlconf\u模块
AttributeError:“RegexURLResolver”对象没有属性“\u urlconf\u module”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python3.3/dist packages/django/core/handlers/base.py”,第101行,在get_响应中
解析程序匹配=解析程序.resolve(请求.path\u信息)
文件“/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py”,第318行,在resolve中
对于self.url_模式中的模式:
文件“/usr/local/lib/python3.3/dist packages/django/core/urlresolvers.py”,第346行,url_模式
patterns=getattr(self.urlconf_模块,“urlpatterns”,self.urlconf_模块)
urlconf_模块中的文件“/usr/local/lib/python3.3/dist packages/django/core/urlresolvers.py”,第341行
self.\u urlconf\u module=import\u模块(self.urlconf\u名称)
文件“/usr/lib/python3.3/importlib/_init__.py”,第90行,在导入模块中
return _bootstrap._gcd_import(名称[级别:],包,级别)
文件“”,第1584行,在_gcd_import中
文件“”,第1565行,在查找和加载中
文件“”,第1532行,在“查找”和“加载”中解锁
文件“”,第584行,在\u check\u name\u包装中
加载模块中第1022行的文件“”
加载模块中第1003行的文件“”
模块\u中的文件“”,第560行,用于\u加载器\u包装器
加载模块中第868行的文件“”
文件“”,第313行,在调用中删除了帧
文件“/home/Cmaden/cmsite/cmsite/url.py”,第4行,在
从myarticle.api导入ArticleResource
文件“/home/Cmaden/cmsite/myarticle/api.py”,第1行,在
从tastypie.resources导入ModelResource
文件“/home/Cmaden/.local/lib/python3.3/site packages/django_tastype-0.11.1-py3.3.egg/tastype/resources.py”,第1742行,在
类BaseModelResource(资源):
BaseModelResource中的文件“/home/Cmaden/.local/lib/python3.3/site packages/django_tastypie-0.11.1-py3.3.egg/tastypie/resources.py”,第2212行
@事务。在成功时提交
文件“/usr/local/lib/python3.3/dist packages/django/db/transaction.py”,第448行,提交成功
PendingDeprecationWarning,stacklevel=2)
PendingDeprecationWarning:不赞成在成功时提交,而赞成使用原子。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/bin/user\u wsgi\u wrapper.py”,第67行,在调用中__
self.error\u log\u file.logger.exception(“运行WSGI应用程序时出错”)
文件“/usr/lib/python3.3/logging/_init__uu.py”,第1269行,例外
self.error(消息,*args,**kwargs)
文件“/usr/lib/python3.3/logging/_init__uu.py”,第1262行出错
self.\u日志(错误、消息、参数、**kwargs)
文件“/usr/lib/python3.3/logging/\uuuu init\uuuuuu.py”,第1368行,在日志中
自我处理(记录)
文件“/usr/lib/python3.3/logging/_init__uuu.py”,第1377行,位于句柄中
如果(非自禁用)和自筛选(记录):
文件“/usr/lib/python3.3/logging/_init__uuu.py”,第687行,在过滤器中
对于self.filters中的f:
文件“/bin/user_wsgi_wrapper.py”,第59行,在调用中__
app\u iterator=self.app(环境,启动\u响应)
文件“/usr/local/lib/python3.3/dist packages/django/core/handlers/wsgi.py”,第206行,在__
响应=自我获取响应(请求)
文件“/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py”,第196行,在get_响应中
response=self.handle\u uncaught\u异常(请求、解析器、sys.exc\u info())
文件“/usr/local/lib/python3.3/dist packages/django/core/handlers/base.py”,第231行,在handle\u uncaught\u异常中
返回调试技术响应(请求,*exc信息)
文件“/usr/local/lib/python3.3/dist-packages/django/views/debug.py”,第69行,技术响应
html=reporter.get\u traceback\u html()
文件“/usr/local/lib/python3.3/dist packages/django/views/debug.py”,第323行,在get\u traceback\u html中
c=上下文(self.get\u traceback\u data())
文件“/usr/local/lib/python3.3/dist-packages/django/views/debug.py”,第281行,在get\u traceback\u数据中
frames=self.get\u traceback\u frames()
文件“/usr/local/lib/python3.3/dist packages/django/views/debug.py”,第428行,在get_traceback_帧中
pre\u context\u line否,pre\u context,context\u line,post\u context=self.\u从\u文件(文件名,行号,7,加载程序,模块名称)获取\u line\u
文件“/usr/local/lib/python3.3/dist-packages/django/views/debug.py”,第379行,从文件中获取
source=loader.get\u source(模块名称)
文件“”,第605行,在\u中需要\u冻结\u包装
ImportError:importlib.\u引导程序不是冻结的模块
回溯(最近一次呼叫最后一次):
urlconf_模块中的文件“/usr/local/lib/python3.3/dist packages/django/core/urlresolvers.py”,第339行
返回self.\u urlconf\u模块
AttributeError:“RegexURLResolver”对象没有属性“\u urlconf\u module”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/usr/local/lib/python3.3/dist packages/django/core/handlers/base.py”,第90行,在get_响应中
响应=中间件\方法(请求)
文件“/usr/local/lib/python3.3/dist-packages/django/middleware/common.py”,第71行,进程中请求
if(不是urlresolvers.is_有效_路径(request.path_info,urlconf)和
文件“/usr/local/lib/python3.3/dist packages/django/core/urlresolvers.py”,第573行,在有效路径中
解析(路径,urlconf)
文件“/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py”,第453行,在resolve中
返回get_解析器(urlconf).resolve(path)
文件“/usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py”,第318行,在resolve中
对于self.url_模式中的模式:
文件
 @transaction.commit_on_success() 
@transaction.atomic()