ValueError: 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-05-07 15:48  keenyeh  阅读(3394)  评论(0编辑  收藏  举报