經安全檢測,此網站為安全網站,請放心前往原始網址!

‘ascii’ codec can’t encode character: ordinal not in range(128) | Python Adventures

Problem UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1: ordinal not in range(128) Solution def encode(text): """ For printing unicode characters to the console. """ return text.encode('utf-8') Or: reload(sys) sys.setdef

pythonadventures.wordpress.com

網址安全性掃描由 google 提供