The OpenShift forums have been retired, but you can still read and search them.
For the most up-to-date information about how to use OpenShift please visit

Trying to setup a WSGIProxy app, but failed. (error 500)

Hello all!

I'm trying to setup a ( WSGIProxy) python 2.7 app(no scaling), but getting error 500.

app address:

Here is the code:

from setuptools import setup
      description='A simple python proxy.',
      author='Tal Hadad',


import os
virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.7/site-packages')
virtualenv = os.path.join(virtenv, 'bin/')
    execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
# IMPORTANT: Put any additional includes below this line.  If placed above this
# line, it's possible required libraries won't be in your searchable path
import wsgi_proxy
def application(environ, start_response):, start_response)
# Below for testing only
if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    httpd = make_server('localhost', 8051, application)
    # Wait for a single request, serve it and quit.

Please help me

I opened up the log file, this is the trace:

* mod_wsgi (pid=21369): Exception occurred processing WSGI script '/var/lib/openshift/5256d9cfe0b8cd7081000032/app-root/runtime/repo/wsgi/application'.
* [error] [client] TypeError: 'NoneType' object is not iterable

Any clue what I'm doing wrong?

Is there anything else around that message that included a line number from your script or anything?