分页: 1 / 1

关于python的命令python submit.py出错的问题

发表于 : 2012-04-16 10:29
xxaqustc
我想使用安装的病毒分析软件cuckoo扫描病毒文件时提示错误如下:
ERROR: Unable to add new task: 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.
查到的相关解决方法如下:
If you want to use 8-bit strings instead of unicode string in sqlite3, set approptiate text_factory for sqlite connection:

connection = sqlite3.connect(...)
connection.text_factory = str
请问上面这两行代码应该加在哪?这样能解决问题么?