問題:字串的編碼不同
處理方式:在適當點加上 .encode("gb2312")
問題範例:http://hi.baidu.com/daping_zhang/blog/item/09dda71ea9d7d21f4134173e.html
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) 錯誤處理
by 阿飄 | Wednesday, October 28, 2009 in App Engine, 程式設計 | 回覆 (0)
A server error occurred. Please contact the administrator.的錯誤處理(google App Engine)
by 阿飄 | Wednesday, October 28, 2009 in App Engine, 程式設計 | 回覆 (0)
這個錯誤源自於字串的編碼的不同
處理方試:在適當的輸出點的字串加上 .decode('utf-8')
錯誤範例:http://markmail.org/message/uypdw4qgnqri6vse#query:A%20server%20error%20occurred.%20Please%20contact%20the%20administrator.%20urlfetch.fetch+page:1+mid:n2t6rvzz7cjuwadd+state:results
Subscribe to:
Posts (Atom)