trac running with mod_wsgi

2 views
Skip to first unread message

MD

unread,
May 25, 2009, 6:20:48 PM5/25/09
to Cube'n User
Hi,

I get an XmlRpcException when submitting local changes for a task to a
repo running Trac with mod_wsgi. The exception says that sys.stdout is
restricted by mod_wsgi while executing ticket.getAvailableCustomActions
().

The mod_wsgi FAQ says this is by design. Should I be using mod_python
instead for this to work with netbeans and cubeon?

Setup: FC10, Apache httpd, Trac 0.11, mod_wsgi (latest), Netbeans
6.5.1, cubeon dev (latest), XmlRpc Python Egg 1.6 in plugins.

Thanks for any insight!

Graham Dumpleton

unread,
May 25, 2009, 10:31:56 PM5/25/09
to Cube'n User


On May 26, 8:20 am, MD <matthewdeni...@gmail.com> wrote:
> Hi,
>
> I get an XmlRpcException when submitting local changes for a task to a
> repo running Trac with mod_wsgi. The exception says that sys.stdout is
> restricted by mod_wsgi while executing ticket.getAvailableCustomActions
> ().
>
> The mod_wsgi FAQ says this is by design. Should I be using mod_python
> instead for this to work with netbeans and cubeon?

The code which is using 'print' without sending it to 'sys.stderr'
should arguably be fixed. If you don't want to or can't do that, then
use the workaround or configure mod_wsgi appropriately so that the
restriction isn't applied. So, see the documentation that the FAQ
points at:

http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Writing_To_Standard_Output

FWIW, this restriction is being removed in mod_wsgi 3.0 specifically
because people can't be bothered to read documentation and/or fix the
code which is arguably doing the wrong thing. See:

http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html

In other words, gave up trying to make people do the right thing and
instead will let people write non portable code as much as they like.

Graham

Matthew Denison

unread,
May 26, 2009, 2:03:01 AM5/26/09
to cubeo...@googlegroups.com
Thanks Graham,

Turning redirect off did the trick. Thanks for the pointer.

Matthew
Reply all
Reply to author
Forward
0 new messages