Ticket #587 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Cannot use 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 adapter which is an alpha. In 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:

Attachments (606 bytes) - added by gabor@… 4 years ago.

Change History

Changed 4 years ago by gabor@…

comment:1 Changed 4 years ago by andrew

Thanks, committed as [853f767dbf55].

comment:2 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.7.3

Add a comment

Modify Ticket

as closed

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.