template problem with Jython

22 views
Skip to first unread message

jlist9

unread,
Aug 31, 2012, 5:55:50 AM8/31/12
to we...@googlegroups.com
Hi all,

I'm trying to use web.py with Jython running on tomcat via modjy. A simple
URL handler works but I've been having some issues with using templates.

In the sample code I have a render.hello("world") call in the URL handler
but the template.py fails to find the template file. I traced into template.py
and found out that the __getattr__ method of Render actually got called 
twice. The first time with the correct "hello" value for the name argument
but the second time with "__repr__" string for name. My guess was it
had something to do with class or template reloading. When I tried 
setting web.config.debug=False I started to get internal server errors
from Tomcat. The part that really confuses me is that the first __getattr__
call continues to the end of the method but when __getattr__ gets called
the second time it didn't reach the rest of the code (I have warnings.warn()
calls that never get called in the second __getattr__ invocation.)

Any idea why this is happening?

Thanks,
Jack
Reply all
Reply to author
Forward
0 new messages