gpt4 book ai didi

python - 不正确配置 : Error importing middleware pp. 中间件: "No module named pp.middleware"

转载 作者:太空狗 更新时间:2023-10-30 02:34:13 38 4
gpt4 key购买 nike

我是 django 和 python 的新手,我试图在一段 django 代码上运行服务器,但我遇到了以下问题,

Kinnovates-MacBook-Pro:platformsite Kinnovate$ python manage.py runserver
Running in development mode.
Running in development mode.
Running in development mode.
Running in development mode.
Validating models...

0 errors found
Django version 1.4b1, using settings 'platformsite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
return self.application(environ, start_response)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 219, in __call__
self.load_middleware()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware pp.middleware: "No module named pp.middleware"

我在 macOSX10.7 上运行 python2.7 1.4b Django我该如何解决这个问题?

最佳答案

您有一个在 settings.MIDDLEWARE_CLASSES 中指定的中间件类,Django 正在尝试导入它,但它在您的 Python 路径中不可用。

您应该确保您已获得中间件源并且您的 Python 路径已正确配置。

关于python - 不正确配置 : Error importing middleware pp. 中间件: "No module named pp.middleware",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9355334/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com