關於UnicodeEncodeError: 'latin-1' codec can't encode characters
這個問題大概是因為字元utf8 沒有解碼因此我的解決方法是
將資料庫裡的使用者帳戶那加charset='utf8', init_command='SET NAMES UTF8'
db = pymysql.connect("ip","userName","passWord","DbName",charset='utf8', init_command='SET NAMES UTF8')
如此就可以解決了

創作者介紹
創作者 晨柚的部落格 的頭像
晨柚

晨柚的部落格

晨柚 發表在 痞客邦 留言(0) 人氣( 35 )