使用python请求接收HTTP 500

时间:2018-05-30 20:32:50

标签: python http python-requests

当我尝试提交json时,我在下面的代码中收到以下错误:

500 Internal Server Error
{"code":"500","error":"invalid character 'o' in literal true (expecting 'r')","message"

我看过其他来源,但没有找到任何关于。有人可以帮助我。

提前致谢

import requests

val = {"token": "90467e25e2c5bbf6476310f9aeb1d005a73ecea5",
"email": "jaycops@gmail.com",
"answer": [{"NU_INSCRICAO": "160000000001", "NOTA_FINAL": 623.3},
{"NU_INSCRICAO": "160000000002", "NOTA_FINAL": 567.2},
{"NU_INSCRICAO": "160000000003", "NOTA_FINAL": 403.1} ]}
r = requests.post("https://api.codenation.com.br/v1/user/acceleration/data-science/challenge/enem-1/submit", data=val)
print(r.status_code, r.reason)
print(r.text)

0 个答案:

没有答案