Ticket #587 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Cannot use south.db.oracle in WSGI application

Reported by: gabor@… Owned by: andrew
Priority: major Milestone: 0.7.3
Component: databaseapi Version: unknown
Keywords: oracle wsgi Cc:


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


oracle.py.patch (606 bytes) - added by gabor@… 5 years ago.

Change History

Changed 5 years ago by gabor@…

comment:1 Changed 5 years ago by andrew

Thanks, committed as [853f767dbf55].

comment:2 Changed 5 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.7.3
Note: See TracTickets for help on using tickets.