I posted this as ticket #293, but I thought it might be good to post it
here too. Is there a general consensus on cross-posting tickets?
Personally I like it, as I monitor the mailing list more closely than
the active tickets.
Using SVN r403 on Windows XP with Python 2.4.1, I get the following
endless autoreloading loop:
Original exception was:
2005/12/28 12:57:30 HTTP INFO SystemExit raised: shutting down
autoreloader
2005/12/28 12:57:30 HTTP INFO CherryPy shut down
2005/12/28 12:57:30 CONFIG INFO Server parameters:
2005/12/28 12:57:30 CONFIG INFO server.environment: development
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
2005/12/28 12:57:32 HTTP INFO SystemExit raised: shutting down
autoreloader
2005/12/28 12:57:32 CONFIG INFO Server parameters:
2005/12/28 12:57:32 HTTP INFO CherryPy shut down
2005/12/28 12:57:32 CONFIG INFO server.environment: development
2005/12/28 12:57:32 CONFIG INFO server.logToScreen: True
2005/12/28 12:57:32 CONFIG INFO server.logFile:
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
'import site' failed; use -v for traceback
2005/12/28 12:57:34 HTTP INFO SystemExit raised: shutting down
autoreloader
2005/12/28 12:57:34 CONFIG INFO Server parameters:
2005/12/28 12:57:34 HTTP INFO CherryPy shut down
2005/12/28 12:57:34 CONFIG INFO server.environment: development
2005/12/28 12:57:34 CONFIG INFO server.logToScreen: True
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
[...]
This problem first arose when I was trying to subclass DataGrid?, but
my subclass did not even need to be used, only present in the
controllers.py file. Further commenting-out led to a minimal
demonstration of the bug, in controllers.py:
import turbogears
from turbogears import controllers,widgets
class OrderGrid(widgets.Widget):
"""Presents a grid with add/edit/delete controls based on a
SelectResults object."""
css=[widgets.CSSLink(widgets.static, "grid.css")]
template = """
<div xmlns:py="http://purl.org/kid/ns#">
</div>
"""
class Root(controllers.RootController):
@turbogears.expose()
def index(self):
import time
return dict(now=time.ctime())