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编码。

原文地址:https://www.cnblogs.com/ygj0930/p/10825918.html