On Dec 29, 2010, at 1:37 PM, A.M. wrote:

> Hello,
> 
> I am attempting to upgrade a TurboGears project which was started (and is 
> working) with TG 2.1b2 to 2.1. I created a new virtual environment in which 
> to experiment, checked out my project into the environment, ran "python 
> setup.py develop" and found that I needed to install repoze.what_pylons and 
> genshi. After this, however, @expose('json') methods seem to get pumped 
> through genshi which barfs on what it thinks is a template name. This same 
> incarnation worked in 2.1b2, so I compared a quickstarted junk project and 
> found that "base_config.renderers.append('json')" is added in app_cfg.py, but 
> I still get the same backtrace on rendering.
> 
> Thanks for any help!

Using winpdb, I found that I was importing my base controller (with the 
@expose('json') decorators) before the app_cfg was fully loaded, so the json 
engine was missing from the renderers. Because json is no longer a renderer by 
default, it was missing from the list of available engines. The fix was to 
delete an extraneous import in lib/__init__.py.

Cheers,
M

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to