【发布时间】:2016-02-03 12:54:05
【问题描述】:
我正在我的 Django 应用程序中通过 IMAP 阅读电子邮件内容。
当我尝试将一些已解析的内容分配给对象并执行 .save() 时,它会返回:
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.
当我打印变量类型时: . DB 中的字段定义为 CharField。我也试过TextField,但结果是一样的。
我该如何解决?
【问题讨论】:
标签: django python-2.7 django-models