Cheetah KeyError: 'GenTemplate'

13 views
Skip to first unread message

jemi

unread,
Jan 11, 2006, 7:35:00 PM1/11/06
to web.py
I am having this annoying "KeyError: 'GenTemplate'" using
CheetahTemplates.
Can someone please give me a hint what i am doing wrong? :)

Studying the webpy documentation and
http://k4ml.com/wiki/python/webpy/simpleblog gave me no hint so far....


traceback:

Launching server: http://0.0.0.0:8080/
Traceback (most recent call last):
File "/mnt/storage/www_sync/webpy/web.py", line 959, in runWSGIApp
result = self.server.app(env, self.wsgiStartResponse)
File "/mnt/storage/www_sync/webpy/web.py", line 1067, in __call__
return self.func(e, o)
File "/mnt/storage/www_sync/webpy/web.py", line 891, in wsgifunc
func()
File "code.py", line 10, in load
web.handle(urls)
File "/mnt/storage/www_sync/webpy/web.py", line 375, in handle
return tocall(*[urllib.unquote(x) for x in args])
File "code.py", line 20, in GET
web.render('view.html')
File "/mnt/storage/www_sync/webpy/web.py", line 826, in render
t = _compiletemplate(template, base=base, isString=isString)
File "/mnt/storage/www_sync/webpy/web.py", line 791, in
__compiletemplate
return execspace['GenTemplate']
KeyError: 'GenTemplate'
roland - - [12/Jan/2006 01:29:17] "GET / HTTP/1.1" 500 -

Aaron Swartz

unread,
Jan 11, 2006, 7:55:42 PM1/11/06
to we...@googlegroups.com
What version of Cheetah are you running?

jemi

unread,
Jan 11, 2006, 8:14:41 PM1/11/06
to web.py
Cheetah.__revision__ = 1.9
and Version.py says 2.0rc1
I just grabbed the latest tar that was availible for download.

System: Debian Sarge, Python2.4, Apache2

Aaron Swartz

unread,
Jan 11, 2006, 8:59:20 PM1/11/06
to we...@googlegroups.com
web.render is designed to be used with 1.0 -- I haven't tested it with 2.0 yet.

jemi

unread,
Jan 12, 2006, 3:27:47 AM1/12/06
to web.py
Ups. Sorry. I must have missed the "for templates: cheetah (download
1.0) [BSD]" statement.

Thanks for the quick reply.

jemi

jemi

unread,
Jan 12, 2006, 6:49:00 AM1/12/06
to web.py
Works perfectly with CheetahTemplate 1.0.

Tavis Rudd

unread,
Jan 12, 2006, 8:45:20 PM1/12/06
to web.py
Hi Aaron,
to make this future safe you should change __compiletemplate to call
the Compiler like this:
c = Compiler(source=text, mainClassName='GenTemplate')
Cheers,
Tavis

jemi

unread,
Jan 24, 2006, 2:26:39 PM1/24/06
to web.py
I just want to mark this issue as resolved.
Version 0.125 of web.py supports cheetahtemplates 2.0.

Thanks!

Reply all
Reply to author
Forward
0 new messages