Not sure where I'm supposed to ask this now, here? Pyramid list?

I have  view with a chameleon template that contains utf-8 unicode special
chars. It renders fine when rendered on it's own from a view. As soon as I
wrap that view with a wrapper view, I get errors with the wrapper choking on
the unicode.

My master views call method is like this:

def __call__(self):
    tmpl_dict = {}
    tmpl_dict['inner_content'] = self.request.wrapped_body
    return tmpl_dict


I get the following traceback ( snipped ):
File
"/home/jordans/Jordans/eggs/repoze.bfg-1.2.2-py2.6.egg/repoze/bfg/router.py",
line 130, in __call__
response = view_callable(context, request)
File
"/home/jordans/Jordans/eggs/repoze.bfg-1.2.2-py2.6.egg/repoze/bfg/configuration.py",
line 1724, in _owrapped_view
wrapper_viewname)
File
"/home/jordans/Jordans/eggs/repoze.bfg-1.2.2-py2.6.egg/repoze/bfg/view.py",
line 90, in render_view_to_response
return view(context, request)
File
"/home/jordans/Jordans/eggs/repoze.bfg-1.2.2-py2.6.egg/repoze/bfg/configuration.py",
line 1663, in _bfg_class_view
response = inst()
File "/home/jordans/Jordans/jordans/views/master_view.py", line 22, in
__call__
tmpl_dict['inner_content'] = u"%s" % self.request.wrapped_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4090:
ordinal not in range(128)


Any clues?

thanks
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to