Modify

Opened 16 years ago

Closed 15 years ago

#4432 closed enhancement (fixed)

mod_wsgi complains about

Reported by: rupert thurner Owned by: Kis Gergely
Priority: normal Component: SvnAuthzAdminPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

WSGIRestrictStdout Off needs to be set for this plugin.

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques suggests you should not write to sys.stdout and do "print" in the code.

Attachments (0)

Change History (2)

comment:1 Changed 16 years ago by rupert thurner

Priority: highnormal
Severity: blockermajor
 Trac detected an internal error:

IOError: sys.stdout access restricted by mod_wsgi

Most recent call last:

    * File "/opt/csw/lib/python/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 432, in _dispatch_request
      Code fragment:
       427. try:
       428. if not env and env_error:
       429. raise HTTPInternalError(env_error)
       430. try:
       431. dispatcher = RequestDispatcher(env)
       432. dispatcher.dispatch(req)
       433. except RequestDone:
       434. pass
       435. resp = req._response or []
       436.  
       437. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[u' except RequestDone:', u' pass', u' resp = ...
      before 	[u' try:', u' if not env and env_error:', u' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x2856a70>
      e 	IOError('sys.stdout access restricted by mod_wsgi',)
      env 	<trac.env.Environment object at 0x2cc9bb0>
      env_error 	None
      exc_info 	(<type 'exceptions.IOError'>, IOError('sys.stdout access restricted by ...
      filename 	'/opt/csw/lib/python/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py ...
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	431
      message 	u'IOError: sys.stdout access restricted by mod_wsgi'
      req 	<Request "GET u'/admin/subversion/svnauthz'">
      resp 	[]
      tb 	<traceback object at 0x3661030>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/opt/csw/lib/python/site-packages/Trac-0.11.2.1-py2.5.egg/trac/web/main.py", line 204, in dispatch
      Code fragment:
       199. req.args.get('__FORM_TOKEN') != req.form_token:
       200. raise HTTPBadRequest('Missing or invalid form token. '
       201. 'Do you have cookies enabled?')
       202.  
       203. # Process the request and render the template
       204. resp = chosen_handler.process_request(req)
       205. if resp:
       206. if len(resp) == 2: # Clearsilver
       207. chrome.populate_hdf(req)
       208. template, content_type = \
       209. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.admin.web_ui.AdminModule object at 0x2856fb0>
      chrome 	<trac.web.chrome.Chrome object at 0x2856a90>
      err 	(<type 'exceptions.IOError'>, IOError('sys.stdout access restricted by ...
      handler 	<trac.admin.web_ui.AdminModule object at 0x2856fb0>
      req 	<Request "GET u'/admin/subversion/svnauthz'">
      self 	<trac.web.main.RequestDispatcher object at 0x2856a70>
    * File "/opt/csw/lib/python/site-packages/Trac-0.11.2.1-py2.5.egg/trac/admin/web_ui.py", line 113, in process_request
      Code fragment:
       108. if not provider:
       109. raise HTTPNotFound(_('Unknown administration panel'))
       110.  
       111. if hasattr(provider, 'render_admin_panel'):
       112. template, data = provider.render_admin_panel(req, cat_id, panel_id,
       113. path_info)
       114.  
       115. else: # support for legacy WebAdmin panels
       116. data = {}
       117. cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,
       118. path_info)
      Local variables:
      Name	Value
      _panel_order 	<function _panel_order at 0x35cb930>
      cat_id 	u'subversion'
      panel_id 	u'svnauthz'
      panels 	[('general', 'General', 'basics', 'Basic Settings'), ('general', ...
      path_info 	None
      provider 	<svnauthz.admin_ui.SvnAuthzAdminPage object at 0x2860c30>
      providers 	{('tracini', 'inherit'): <iniadmin.iniadmin.IniAdminPlugin object at ...
      req 	<Request "GET u'/admin/subversion/svnauthz'">
      self 	<trac.admin.web_ui.AdminModule object at 0x2856fb0>
    * File "/opt/csw/lib/python/site-packages/SvnAuthzAdminPlugin-0.1.2._Moved.to.Trac.0.11_-py2.5.egg/svnauthz/admin_ui.py", line 79, in render_admin_panel 

comment:2 Changed 15 years ago by rupert thurner

Resolution: fixed
Status: newclosed

(In [6343]) remove print statements to shut up mod_wsgi, fix #4432.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Kis Gergely.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.