TurboGears / backlash

Standalone WebOb port of the Werkzeug Debugger with Python3 support born as a WebError replacement for TurboGears2
MIT License
13 stars 11 forks source link

Problems with non-ascii exception messages #5

Closed Cito closed 10 years ago

Cito commented 11 years ago

Today I noticed that backlash has the same problem with non-ascii exception messages that I already had to fix for pyramid_debugtoolbar: https://github.com/Pylons/pyramid_debugtoolbar/pull/43

jurov commented 10 years ago

Same here with tg 2.3 , got backtrack like (for if someone googles this):

File ".../tg2env/lib/python2.7/site-packages/backlash/tbtools.py", line 317, in render_full 'summary': self.render_summary(include_title=False), File ".../tg2env/lib/python2.7/site-packages/backlash/tbtools.py", line 303, in render_summary 'description': description_wrapper % escape(self.exception) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 84: ordinal not in range(128)

Fixed (under Linux) by setting LC_ALL=C and LANG=C environment variables.

amol- commented 10 years ago

898ab57d65473fd8ee14997986e3ce7c505a9da4 and 246601bed6d78f5f78a2272963df934b323d51a4 together should fix issues with utf8 exceptions. Can you confirm this?

jurov commented 10 years ago

Confirmed, it correctly shows localized exception message.