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 #1494 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Toolbox barfs when run from a TG project that uses Genshi

Reported by: mikl Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version: 1.0.3
Severity: normal Keywords:
Cc:

Description

I just tried to start the toolbox from one of my projects that use Genshi, and I get this traceback:

Page handler: <function _wrapper at 0x8e6fe64>
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 105, in _run
    self.main()
  File "/usr/local/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/_cphttptools.py", line 254, in main
    body = page_handler(*virtual_path, **self.params)
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/identity/conditions.py", line 275, in _wrapper
    return fn( *args, **kw )
  File "<string>", line 3, in index
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/controllers.py", line 344, in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/database.py", line 373, in sa_rwt
    retval = dispatch_exception(e,args,kw)
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/database.py", line 356, in sa_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/controllers.py", line 359, in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/controllers.py", line 399, in _execute_func
    return _process_output(output, template, format, content_type, mapping, fragment)
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/controllers.py", line 86, in _process_output
    fragment=fragment)
  File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/view/base.py", line 129, in render
    return engine.render(**kw)
  File "/var/lib/python-support/python2.5/genshi/template/plugin.py", line 104, in render
    return self.transform(info, template).render(**kwargs)
  File "/var/lib/python-support/python2.5/genshi/template/plugin.py", line 149, in transform
    return super(MarkupTemplateEnginePlugin, self).transform(data, template)
  File "/var/lib/python-support/python2.5/genshi/template/plugin.py", line 109, in transform
    template = self.load_template(template)
  File "/var/lib/python-support/python2.5/genshi/template/plugin.py", line 91, in load_template
    return self.loader.load(templatename)
  File "/var/lib/python-support/python2.5/genshi/template/loader.py", line 214, in load
    raise TemplateNotFound(filename, search_path)
TemplateNotFound: Template "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/toolbox/main.html" not found

Apparently, TurboGears assumes that the toolbox should use the same template system as the TG project it is run from. As Toolbox still uses kid (.kid files), no Genshi templates (.html) can be found.

Change History

comment:1 Changed 10 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r4079.

comment:2 Changed 9 years ago by claudep

  • Status changed from closed to reopened
  • Resolution fixed deleted

I'm still getting this error with TG 1.0.4.3

comment:3 Changed 9 years ago by claudep

  • Status changed from reopened to closed
  • Resolution set to fixed

Mmmh, sorry. It seems 1.0.4.3 is too old to contain the fix.

comment:4 Changed 9 years ago by chrisz

Yes, the fix happened a few hours later :-( You should update to TG 1.0.5.

Note: See TracTickets for help on using tickets.