Python UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 ordinal not in range(128)

前端 未结 3 518
轻奢々
轻奢々 2020-12-31 10:07

I\'m trying to write my first app in Google App Engine with Python (link of the app: http://contractpy.appspot.com/ - it\'s just an experimental app). The entire code is bel

3条回答
  •  北海茫月
    2020-12-31 10:40

    Set default encoder at the top of your code

    In appcfg.py which resides inside /google/appengine/tools/appcfg.py

    on line 73 add

    import sys
    reload(sys)
    sys.setdefaultencoding("ISO-8859-1")
    

提交回复
热议问题