Such an error.
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/search/search.py", line 1121, in _DecodeUTF8
return pb_value.decode('utf-8')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 158-159: invalid continuation byte
It looks like a bug around unicode, but it works for some reason when deployed.
Refer to this https://code.google.com/p/googleappengine/issues/detail?id=9335 However, if you keep this link, it will not work and it will look like the following (note that you have touched the library directly).
/google_appengine/google/appengine/_internal/antlr3/streams.py
335 >.# The data being scanned
336 data = data.encode("utf-8") #Add this
337 self.strdata = unicode(data, errors="replace")
338 self.data = [ord(c) for c in self.strdata]
/usr/local/google_appengine/google/appengine/api/search/search.py
1118 #def _DecodeUTF8(pb_value):
1119 # """Decodes a UTF-8 encoded string into unicode."""
1120 # if pb_value is not None:
1121 # return pb_value.decode('utf-8')
1122 # return None
1123
1124 def _DecodeUTF8(pb_value): #Replace this
1125 """Decodes a UTF-8 encoded string into unicode."""
1126 if pb_value is not None:
1127 return pb_value.decode('utf-8', errors='replace') if not isinstance(pb_value, unicode) else pb_value
For the time being.
Recommended Posts