Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #573 (closed defect: worksforme)

Opened 12 years ago

Last modified 9 years ago

turbocheetah not working well with turbokid

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone: 0.9
Component: Kid Version:
Severity: major Keywords:
Cc:

Description

Using current svn ( and latest versions of the template plugins):

TurboGears-0.9a0dev_r770-py2.4.egg turbocheetah-0.9.3-py2.4.egg turbokid-0.9.0-py2.4.egg

Rendering a turbocheetah template, and then rendering a kid template produces the following error:

500 Internal error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Page handler: <bound method Root.test_kid of <testapp.controllers.Root object at 0x010ED930>>
Traceback (most recent call last):
  File "c:\engines\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py", line 99, in _run
    self.main()
  File "c:\engines\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py", line 247, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in test_kid
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r770-py2.4.egg\turbogears\controllers.py", line 198, in expose
    func, tg_format, html, fragment, *args, **kw)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r770-py2.4.egg\turbogears\database.py", line 193, in run_with_transaction
    retval = func(*args, **kw)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r770-py2.4.egg\turbogears\controllers.py", line 220, in _execute_func
    return _process_output(tg_format, output, html, fragment)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r770-py2.4.egg\turbogears\controllers.py", line 68, in _process_output
    fragment=fragment)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r770-py2.4.egg\turbogears\view.py", line 60, in render
    return engine.render(info, format, fragment, template)
  File "c:\engines\python24\lib\site-packages\turbokid-0.9.0-py2.4.egg\turbokid\kidsupport.py", line 122, in render
    tclass = self.load_template(template)
  File "c:\engines\python24\lib\site-packages\turbokid-0.9.0-py2.4.egg\turbokid\kidsupport.py", line 96, in load_template
    mod = _freshen_template(package, basename, tfile, classname)
  File "c:\engines\python24\lib\site-packages\turbokid-0.9.0-py2.4.egg\turbokid\kidsupport.py", line 41, in _freshen_template
    saved_mtime = sys.modules[classname].__mtime__
AttributeError: 'module' object has no attribute '__mtime__'

Powered by CherryPy 2.2.0beta 

This makes it near impossible to use turbocheetah and turbokid together. )-;

Change History

comment:1 Changed 12 years ago by anonymous

  • Component changed from TurboGears to Kid

Upgrading turbokid (see traceback below) just seems to creates another problem, and this in the same sequence of rendering a turbocheetah template, and then rendering a kid template:

500 Internal error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Page handler: <bound method Root.test_kid of <app.controllers.Root object at 0x0100D210>>
Traceback (most recent call last):
  File "c:\engines\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py", line 99, in _run
    self.main()
  File "c:\engines\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py", line 247, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in test_kid
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r806-py2.4.egg\turbogears\controllers.py", line 202, in expose
    tg_format, html, fragment, *args, **kw)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r806-py2.4.egg\turbogears\database.py", line 193, in run_with_transaction
    retval = func(*args, **kw)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r806-py2.4.egg\turbogears\controllers.py", line 225, in _execute_func
    return _process_output(tg_format, output, html, fragment)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r806-py2.4.egg\turbogears\controllers.py", line 68, in _process_output
    fragment=fragment)
  File "c:\engines\python24\lib\site-packages\TurboGears-0.9a0dev_r806-py2.4.egg\turbogears\view.py", line 60, in render
    return engine.render(info, format, fragment, template)
  File "c:\engines\python24\lib\site-packages\turbokid-0.9.1dev_r787-py2.4.egg\turbokid\kidsupport.py", line 94, in render
    tclass = self.load_template(template)
  File "c:\engines\python24\lib\site-packages\turbokid-0.9.1dev_r787-py2.4.egg\turbokid\kidsupport.py", line 74, in load_template
    tempclass = mod.Template
AttributeError: 'module' object has no attribute 'Template'

comment:2 Changed 11 years ago by Kaan

I tested this and they both seemed to work fine.

Can you post some of your code or more information?

comment:3 Changed 11 years ago by Kaan

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.