Python报错:ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that ca

来源:互联网 发布:淘宝兔八哥aj 编辑:程序博客网 时间:2024/05/17 23:27

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 = sqlite3.connect(“sys.db”)

cx.text_factory = str

0 0
原创粉丝点击