解决ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can错误

林彬
2023-12-01

ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
在连接数据库之后添加

cx.text_factory = str

cx = sqlite3.connect("sys.db")
cx.text_factory = str
 类似资料: