Error on return visit

6 views
Skip to first unread message

mconnors

unread,
Jun 15, 2009, 1:42:46 PM6/15/09
to cherrypy-users
Hi,
I am new to this list, but I have been using Cherrypy for a while.

I recently noticed that when I am testing a site I am building and
then return to test again many hours later I get the error message
below.

A simple refresh in the browser makes it go away, but I would like to
avoid having end users seeing this.

Could it maybe be an attempt to write to a log file that the cherrypy
user does not have access to?

Regards,
Michael

Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/wsgiserver/__init__.py", line 754, in communicate
req.respond()
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/wsgiserver/__init__.py", line 476, in respond
self._respond()
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/wsgiserver/__init__.py", line 487, in _respond
response = self.wsgi_app(self.environ, self.start_response)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/wsgiserver/__init__.py", line 115, in __call__
return app(environ, start_response)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cptree.py", line 128, in __call__
return self.wsgiapp(environ, start_response)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cpwsgi.py", line 312, in __call__
return head(environ, start_response)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cpwsgi.py", line 300, in tail
return self.response_class(environ, start_response, self.cpapp)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cpwsgi.py", line 74, in __init__
self.setapp()
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cpwsgi.py", line 97, in setapp
_cherrypy.log(tb)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/__init__.py", line 382, in __call__
return log.error(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/CherryPy-3.1.0beta3-py2.4.egg/
cherrypy/_cplogging.py", line 51, in error
self.error_log.log(severity, ' '.join((self.time(), context,
msg)))
File "/usr/lib/python2.4/logging/__init__.py", line 1040, in log
apply(self._log, (level, msg, args), kwargs)
File "/usr/lib/python2.4/logging/__init__.py", line 1079, in _log
self.handle(record)
File "/usr/lib/python2.4/logging/__init__.py", line 1089, in handle
self.callHandlers(record)
File "/usr/lib/python2.4/logging/__init__.py", line 1126, in
callHandlers
hdlr.handle(record)
File "/usr/lib/python2.4/logging/__init__.py", line 642, in handle
self.emit(record)
File "/usr/lib/python2.4/logging/__init__.py", line 744, in emit
self.handleError(record)
File "/usr/lib/python2.4/logging/__init__.py", line 693, in
handleError
traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
File "/usr/lib/python2.4/traceback.py", line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File "/usr/lib/python2.4/traceback.py", line 13, in _print
file.write(str+terminator)
IOError: [Errno 5] Input/output error

Gloria W

unread,
Jun 15, 2009, 9:28:25 PM6/15/09
to cherryp...@googlegroups.com
I occasionally have the same issue when I forget to comment out my print
debug.
It happens when you start cherrypy in the background or as a daemon in a
command window, then close the window later. The print statements have
no valid STDOUT any longer, and they fail.
You may want to consider logging instead of print for debugging, unless
there's something temporary and annoying you want to debug, and you'll
be deleting the debug code soon afterward.
Gloria

Michael Connors

unread,
Jun 16, 2009, 2:38:49 AM6/16/09
to cherryp...@googlegroups.com


2009/6/16 Gloria W <stra...@comcast.net>


I occasionally have the same issue when I forget to comment out my print
debug.
It happens when you start cherrypy in the background or as a daemon in a
command window, then close the window later. The print statements have
no valid STDOUT any longer, and they fail.
You may want to consider logging instead of print for debugging, unless
there's something temporary and annoying you want to debug, and you'll
be deleting the debug code soon afterward.
Gloria


Thanks, I will grep for prints to see if I have left some debugging messages lying around.

--
Michael Connors

Robert Brewer

unread,
Jun 16, 2009, 10:30:26 AM6/16/09
to cherryp...@googlegroups.com
Michael Connors wrote:
> Thanks, I will grep for prints to see if I have
> left some debugging messages lying around.

...and set "log.screen = False" in your config. Turn on log.error_file
instead.

http://www.cherrypy.org/wiki/Logging#Simpleconfig


Robert Brewer
fuma...@aminus.org

Michael Connors

unread,
Jun 16, 2009, 11:18:31 AM6/16/09
to cherryp...@googlegroups.com


...and set "log.screen = False" in your config. Turn on log.error_file
instead.



Thanks, I will do this also.

Regards,
--
Michael Connors

Reply all
Reply to author
Forward
0 new messages