Skip to content

Instantly share code, notes, and snippets.

@littleq0903
Created November 27, 2013 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save littleq0903/7681603 to your computer and use it in GitHub Desktop.
Save littleq0903/7681603 to your computer and use it in GitHub Desktop.
Solution of "RuntimeError: UnicodeDecodeError('utf8', "id_token verification failed: Can't parse header: \xc9\xad\xbd", 52, 53, 'invalid start byte')" https://code.google.com/p/googleappengine/issues/detail?id=10285&q=Type%3DDefect&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log&start=100
*** logservice_stub.py 2013-11-27 09:09:49.463620508 -0800
--- logservice_stub.py.new 2013-11-27 09:16:53.893843940 -0800
***************
*** 19,20 ****
--- 19,21 ----
import atexit
+ import codecs
import logging
***************
*** 217,219 ****
if isinstance(message, str):
! message = message.decode('utf-8')
return (row_id, log_line.timestamp_usec(), log_line.level(), message)
--- 218,220 ----
if isinstance(message, str):
! message = codecs.decode(message, 'utf-8', 'replace')
return (row_id, log_line.timestamp_usec(), log_line.level(), message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment