Frustrating problem here... after hours of debugging various problems transitioning my application to webfaction's servers, I'm finally ready to start my server, and... my heart just sank upon seeing "500 SERVER ERROR" in big black font. Checking the logs, the error is:
| [Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] mod_wsgi (pid=2807): Exception occurred processing WSGI script '/home/germanjoey/webapps/django/mysite.wsgi'.
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] Traceback (most recent call last):
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] File "/home/germanjoey/webapps/django/lib/python2.7/django/core/handlers/wsgi.py", line 250, in __call__
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] self.load_middleware()
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] File "/home/germanjoey/webapps/django/lib/python2.7/django/core/handlers/base.py", line 47, in load_middleware
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Thu Aug 11 17:05:46 2011] [error] [client 127.0.0.1] ImproperlyConfigured: Error importing middleware djangobb_forum.middleware: "No module named djangobb_forum.middleware"
|
Hmmm, I think... on a hunch, I change the line in settings.py to instead use "mysite.djangobb_forum.middlware", and that gets me a new error:
| [Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] mod_wsgi (pid=4176): Exception occurred processing WSGI script '/home/germanjoey/webapps/django/mysite.wsgi'.
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] Traceback (most recent call last):
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] File "/home/germanjoey/webapps/django/lib/python2.7/django/core/handlers/wsgi.py", line 250, in __call__
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] self.load_middleware()
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] File "/home/germanjoey/webapps/django/lib/python2.7/django/core/handlers/base.py", line 47, in load_middleware
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Thu Aug 11 17:13:12 2011] [error] [client 127.0.0.1] ImproperlyConfigured: Error importing middleware mysite.djangobb_forum.middleware: "No module named djangobb_forum.subscription"
|
The error of course being that it cannot load a module from within the middleware file it can now find, because it needs to be "mysite.djangobb_forum.subscription" instead of "djangobb_forum.subscription."
This is awful! There's no way I can go and change my hundreds and hundreds of imports around like this! Even if I could, it would break my testing setup on my laptop. Is there way I can set the system path up, or something, so that django can find my modules? I feel like I'm so close here!
asked
Aug 11 '11 at 16:30
germanjoey
5●2