This problem (or something very much like it) cropped up for me again.

I get it only when trying to access my query methods/templates, not on
any of my "static" methods/templates that just serve as html.  Once it
breaks, the static methods remain functional, but none of the dynamic
content templates work anymore.

Here's the first error:

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
    main()
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 240,
in newfunc
    html, fragment, *args, **kw)
  File "/home/mikez0r/TG0.9/trunk/turbogears/database.py", line 189, in
run_with_transaction
    retval = func(*args, **kw)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 262,
in _execute_func
    return _process_output(tg_format, output, html, fragment)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 62,
in _process_output
    output = view.render(output, tg_format,
template=template,fragment=fragment)
  File "/home/mikez0r/TG0.9/trunk/turbogears/view.py", line 57, in
render
    return engine.render(info, format, fragment, template)
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 137, in render
    return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py",
line 232, in serialize
    return serializer.serialize(self, encoding, fragment)
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py",
line 51, in serialize
    text = list(self.generate(stream, encoding, fragment))
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py",
line 316, in generate
    stream = iter(stream)
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py",
line 257, in __iter__
    return iter(self.transform())
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py",
line 312, in transform
    stream = self.pull()
  File
"/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py",
line 271, in pull
    self.initialize()
  File "/var/www/localhost/htdocs/photogal/photogal/templates/rand.py",
line 19, in initialize
  File
"/var/www/localhost/htdocs/photogal/photogal/templates/picmenu.py",
line 20, in initialize
  File
"/var/www/localhost/htdocs/photogal/photogal/templates/master.py", line
19, in initialize
TypeError: 'NoneType' object is not callable


If I then refresh the page, I get a second error:

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
    main()
  File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.1-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
    body = page_handler(*args, **cherrypy.request.paramMap)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 240,
in newfunc
    html, fragment, *args, **kw)
  File "/home/mikez0r/TG0.9/trunk/turbogears/database.py", line 189, in
run_with_transaction
    retval = func(*args, **kw)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 262,
in _execute_func
    return _process_output(tg_format, output, html, fragment)
  File "/home/mikez0r/TG0.9/trunk/turbogears/controllers.py", line 62,
in _process_output
    output = view.render(output, tg_format,
template=template,fragment=fragment)
  File "/home/mikez0r/TG0.9/trunk/turbogears/view.py", line 57, in
render
    return engine.render(info, format, fragment, template)
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 123, in render
    tclass = self.load_template(template)
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 97, in load_template
    mod = _freshen_template(package, basename, tfile, classname)
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 45, in _freshen_template
    if _freshen_bases(bases, saved_ctime) or saved_ctime < mtime:
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 23, in _freshen_bases
    if _freshen_bases(base.__bases__, saved_ctime):
  File
"/usr/lib/python2.4/site-packages/TurboKid-0.9.0-py2.4.egg/turbokid/kidsupport.py",
line 29, in _freshen_bases
    mtime = os.stat(sys.modules[modname].__file__).st_mtime
KeyError: 'kid.util.template_0x3E44F9BL'


Tried to fix by getting latest SVN, running python setup.py develop,
and also running python setup.py install in the plugins/kid directory.

Reply via email to