2015-09-26 30 views
1

寫入到一個SQL-煉丹VARCHAR字符串元素如何確定字串

....You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str).... 

如何確定在Python字符串類型時,我收到以下錯誤的類型?

回答

1

8-bit bytestring指上這是在Unicode HOWTO

發現發送代碼到SQL確保您對其進行解碼使用data.decode('utf-8')這應該刪除您遇到的錯誤之前的Unicoding更多的信息。

相關問題