Ticket #587 (closed defect: fixed)
Cannot use south.db.oracle in WSGI application
|Reported by:||gabor@…||Owned by:||andrew|
I have an Oracle database connection set up in Django. I use South. For that connection, it uses the south.db.oracle adapter which is an alpha. In oracle.py South prints some warning about this. This is okay. However, in a WSGI application this raises an "IOError: sys.stdout access restricted by mod_wsgi", because a WSGI application cannot directly "print" since WSGI communicates with the webserver using the standard IO facilities. Instead of simply echoing a string, you should print to the error interface:
print >> sys.stderr, 'message'
More details on this: http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html