开发者

"No module named slimmer.middleware"

I'm trying to setup blog engine django-mingus, but meet this obstacle:

[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161] mod_wsgi (pid=12908): Exception occurred processing WSGI script '/home/piv/srv/python-env/myblog/project/django-mingus/mingus/deploy/django.wsgi'.
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161] Traceback (most recent call last):
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161]   File "/home/piv/srv/python-env/myblog/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 230, in __call__
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161]     self.load_middleware()
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161]   File "/home/piv/srv/python-env/myblog/lib/python2.5/site-packages/django/core/handlers/base.py", line 42, in load_middleware
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161]     raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
[Tue Mar 30 04:14:02 2010] [error] [client 192.168.12.161] ImproperlyConfigured: Error importing middleware slimmer.middleware: "No module named slimmer.middleware"

When I start Django development server it works well, but through Apache+mod_wsgi it appears this issue. Wha开发者_JS百科t could be the reason of this problem?


Read:

http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

Try the alternate WSGI script file described at the end.

This will resolve some sys.path issues if you hadn't done anything to address them yourself.

If still doesn't work, may be a permissions issue given that Apache normally runs as different user and so may not be able to read code if that code was only readable to you. See:

http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights_Of_Apache_User

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜