简体   繁体   中英

Python - XML not well-formed (invalid token) Debug Values

I'm getting this error when I try to import some of the saleorders, I need to debug the values of the return statement but i'm not getting anything but errors. The code is working for the majority of the saleorders but i get in the error on a couple of orders and i can't identify the error.

I try with print_r() and var_dump() but is not working.

Python is returning the error "ValueError: "not well-formed (invalid token)".

Thanks.

$saleorders[] = new xmlrpcval( array("id" => new xmlrpcval( $row[0], "int"),
                "price_type" => new xmlrpcval( clean_special_chars($price_type), "string" ),
                "note" => new xmlrpcval(clean_special_chars($note), "string" ),
                "lines" => new xmlrpcval( $orderlines, "array"),
                "pay_met" => new xmlrpcval( search_payment_method($row[24]), "int"),
                "pay_met_title" => new xmlrpcval( clean_special_chars($row[24]), "string"),
                "shipping_price" => new xmlrpcval( $shopping_price, "double"),
                "shipping_title" => new xmlrpcval(html_entity_decode(clean_special_chars($shipping_title)), "string"),
                "orders_status" => new xmlrpcval( clean_special_chars($status), "string"),
                "partner" => $partner,
                "date" => new xmlrpcval( $row[21], "string"),
                "address" => $default_address,
                "delivery" => $delivery_address,
                "billing" => $billing_address,
                "order_subtotal" => new xmlrpcval($order_subtotal, "double"),
                "order_tax" => new xmlrpcval($order_tax, "double"),
                "order_total" => new xmlrpcval($order_total, "double"),
            ), "struct");

return new xmlrpcresp(new xmlrpcval($saleorders, "array"));

尝试对xmlrpcval进行序列化的方法以查看值链接: https ://gggeek.github.io/jsxmlrpc/javadoc/xmlrpcval.html#serialize

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM