您的位置:首页 > 编程语言 > Python开发

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

2016-12-02 10:37 399 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐