当写入sql-alchemy 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中字符串的类型?
发布于 2015-09-26 22:41:06
8-bit bytestring指的是在Unicode方法中找到的有关这方面的更多信息。
在将代码发送到sql之前,请确保使用data.decode('utf-8')对其进行解码,这将删除正在发生的错误。
https://stackoverflow.com/questions/32802688
复制相似问题