1, the error content: You must is not the use 8-bit bytestrings unless the use a text_factory the can interpret 8-bit bytestrings (like Text_fa ctory = str). It is highly recommended, instead just switch your application to Unicode strings.
Error description: Occurs when using the Sqlite3 module for DB file processing in Python;
Knowledge points and Solutions:
conn = Sqlite3.connection ("... ")
Conn.text_factory = str
Problem Solution Source: http://bbs.csdn.net/topics/250055755
Sets what type of Python to use to handle the text type of sqlite3, which is Unicode by default, so it produces
Operationalerror:could not decode to UTF-8 column ' name ' with text ' domestic other '
This error
Because the data is fetched from the database, it is GBK encoded (because the last time you saved in is GBK)
The default value for Conn.text_factory is that Unicode,python will attempt to convert a field of type text to Unicode, resulting in an error
Python Run error condition