All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters 

    中文编码造成,在models文件中定义的字段中文值在XML视图文件中不兼容。

    解决方法:在models文件中的中文处前加 u ,转为utf8编码。

posted @ 2019-09-22 14:25  XuMou  阅读(1566)  评论(0编辑  收藏  举报