We're Hiring!

CLOSED:python error on import djangologging.middleware

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

CLOSED:python error on import djangologging.middleware

Postby genetics_lab » Thu Jul 29, 2010 11:50 pm

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.
genetics_lab
 
Posts: 7
Joined: Tue Jul 20, 2010 10:15 pm

Re: python error on import djangologging.middleware

Postby cxallan » Fri Jul 30, 2010 7:22 am

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
...
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: python error on import djangologging.middleware

Postby genetics_lab » Fri Jul 30, 2010 3:53 pm

That works! Thanks
genetics_lab
 
Posts: 7
Joined: Tue Jul 20, 2010 10:15 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest