Alessandro, thank you for checking on this! I think I found what went wrong: apparently i tried to return dict() in no-template method instead of just plain string and that lead to an error. When I tried your example everything works just fine. Sorry for raising false alarm and thank you for your help!
Best, Erni. On Friday, August 30, 2013 2:11:59 AM UTC-6, Alessandro Molina wrote: > > I just tried with a plain: > > @expose() > def test(): > return 'HI' > > and it worked without issues. > > Looks like you are trying to render a template somehow, can you point out > the controller code? > > > On Fri, Aug 30, 2013 at 12:56 AM, Erni Wogernom > <[email protected]<javascript:> > > wrote: > >> Hi there, >> >> I am trying to port my application to recently released TG-2.3 and >> notice the following problem: before (2.2) it was possible to use @expose() >> without specifying templates to serve data-pages (like binary files). But >> right now this code lead to error (see below). Any idea how to work around >> this? >> >> Thanks, >> >> Erni. >> >> >> File >> "/home/erni/TurboGears-2.3/lib/python2.7/site-packages/tg/render.py", line >> 225, in cached_template >> return render_func() >> File "/home/erni/TurboGears-2.3/lib/python2.7/site-packages/tg/render.py", >> line 377, in render_template >> template = self.load_template(template_name) >> File >> "/home/erni/TurboGears-2.3/lib/python2.7/site-packages/tg/dottednames/genshi_lookup.py", >> >> line 28, in load >> self, self.get_dotted_filename(filename), >> File >> "/home/erni/TurboGears-2.3/lib/python2.7/site-packages/tg/dottednames/genshi_lookup.py", >> >> line 18, in get_dotted_filename >> if not filename.endswith(self.template_extension): >> *AttributeError: 'NoneType' object has no attribute 'endswith'* >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TurboGears" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/turbogears. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/groups/opt_out.

