UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128) 報錯

python2.7 開始想的是編碼錯誤,於是乎在頂部加入代碼 # -*- coding: utf-8 -*- 繼續報錯,於是乎從網上查詢,又加上了一行代碼,解決問題 import sys reload(sys) sys.setdefaultencoding('utf8')
相關文章
相關標籤/搜索