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

    xiaoxiao2021-12-14  20

    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

    转载请注明原文地址: https://ju.6miu.com/read-962332.html

    最新回复(0)