Hi,
I am having issues with trying to convert an UTF-8 string to unicode. I get the error.
UnicodeEncodeError: 'ascii' codec can't encode characters in position 73-75: ordinal not in range(128)
I tried wrapping this in a try
/except
block but then google was giving me a system administrator error which was one line.
Can someone suggest how to catch this error and continue.
Cheers, John.
-- FULL ERROR --
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py", line 501, in __call__
handler.get(*groups)
File "/Users/johnb/Sites/hurl/hurl.py", line 153, in get
self.redirect(url.long_url)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py", line 371, in redirect
self.response.headers['Location'] = str(absolute_url)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 73-75: ordinal not in range(128)