Page 1 of 1

CLOSED:python error on import djangologging.middleware

PostPosted: Thu Jul 29, 2010 11:50 pm
by genetics_lab
Hello,

I recently finished the install of Omero 4.1.1 on RHEL5. I am trying to run the web server, I start it up from the lib/python/omeroweb/ folder by typing:
Code: Select all
python manage.py runserver


The server starts just fine, but when I try to get it to serve a page I get the following errors:

Code: Select all
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 280, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 674, in __call__
    return self.application(environ, start_response)
  File "/usr/local/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 230, in __call__
    self.load_middleware()
  File "/usr/local/lib/python2.6/site-packages/django/core/handlers/base.py", line 42, in load_middleware
    raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware djangologging.middleware: "No module named djangologging.middleware"


I am not sure if this is a path problem or maybe I don't have the djangologging.middleware module? Your suggestions would be very much appreciated. Thanks.

Re: python error on import djangologging.middleware

PostPosted: Fri Jul 30, 2010 7:22 am
by cxallan
lib/python must be on your PYTHONPATH. If you're starting it from that folder, this should be sufficient:

Code: Select all
PYTHONPATH=$PYTHONPATH:../ python manage.py runserver
...

Re: python error on import djangologging.middleware

PostPosted: Fri Jul 30, 2010 3:53 pm
by genetics_lab
That works! Thanks