用django写东西,出现的这个错误 解决办法: 在search.py文件中添加 import sys reload(sys) sys.setdefaultencoding('utf-8') 问题就解决了~