无法将JSON值转换为System.Int32 python POST

2024-09-28 05:20:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我对python中的POST方法有一个问题

我的代码:

url = "https://blablabla.com"
data = {
    "data1": "blalba",
    "data2": "12"
}

resp = requests.post(url, json=data)

print(resp.text)

我的输出是:

{"result":false,"data":null,"error":{"httpStatusCode":0,"errorMessages":null,"isError":false},"validationErrors":[{"field":"$.sicno","error":["The JSON value could not be converted to System.Int32. Path: $.sicno | LineNumber: 0 | BytePositionInLine: 18."]}],"isError":true}

我怎么办?多谢各位


Tags: 方法代码httpscomfalseurldataerror

热门问题