1952: Under mod_wsgi: "IOError: sys.stdout access restricted by mod_wsgi" (reviewboard/reviews/datagrids.py, line 53, in augment_queryset)

julian*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 30, 2011
I'm running Review Board 1.5.2, Apache 2.2.16, mod_wsgi 2.8, Python 2.6.6.

If I access <https://(my Review Board instance)/groups/>, I get a "Something broke! (Error 500)" error.  

logs/reviewboard.log says:

2011-01-18 21:52:56,758 - ERROR - Exception thrown for user julian at https://.../groups/

sys.stdout access restricted by mod_wsgi
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python2.6/site-packages/ReviewBoard-1.5.2-py2.6.egg/reviewboard/accounts/decorators.py", line 27, in _check
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python2.6/site-packages/ReviewBoard-1.5.2-py2.6.egg/reviewboard/reviews/views.py", line 301, in group_list
    return GroupDataGrid(request).render_to_response(template_name)
  File "/usr/local/lib/python2.6/site-packages/Djblets-0.6.7-py2.6.egg/djblets/datagrid/grids.py", line 699, in render_to_response
    self.load_state()
  File "/usr/local/lib/python2.6/site-packages/Djblets-0.6.7-py2.6.egg/djblets/datagrid/grids.py", line 534, in load_state
    self.precompute_objects()
  File "/usr/local/lib/python2.6/site-packages/Djblets-0.6.7-py2.6.egg/djblets/datagrid/grids.py", line 610, in precompute_objects
    pk__in=self.id_list).order_by())
  File "/usr/local/lib/python2.6/site-packages/Djblets-0.6.7-py2.6.egg/djblets/datagrid/grids.py", line 653, in post_process_queryset
    queryset = column.augment_queryset(queryset)
  File "/usr/local/lib/python2.6/site-packages/ReviewBoard-1.5.2-py2.6.egg/reviewboard/reviews/datagrids.py", line 53, in augment_queryset
    print profile.starred_groups.all()

The relevant line of code is a "print" statement.  Obviously print is disallowed under mod_wsgi.
chipx86
#1 chipx86
We'll get a fix out. In the meantime, you can add 'WSGIRestrictStdout Off' to your config.
  • +Confirmed
  • -Priority-Medium
    +Priority-Critical
    +Milestone-Release1.5.x
david
#2 david
  • -Confirmed
    +Fixed