Python 在“调查猴子”中包含图像
我试图将一张图片作为调查问题,它给出了以下错误 surveymonty.exceptions.SurveyMontapiError:{“error”:{“docs”:“message”:“未能验证字段“Headers”列表架构:字段“_data”中不允许使用“properties”未定义的其他属性,id:“1002”,“name:“Bad Request”,“http_状态代码”:400} 我使用下面的JSON代码Python 在“调查猴子”中包含图像,python,json,api,surveymonkey,Python,Json,Api,Surveymonkey,我试图将一张图片作为调查问题,它给出了以下错误 surveymonty.exceptions.SurveyMontapiError:{“error”:{“docs”:“message”:“未能验证字段“Headers”列表架构:字段“_data”中不允许使用“properties”未定义的其他属性,id:“1002”,“name:“Bad Request”,“http_状态代码”:400} 我使用下面的JSON代码 payload ={ "headings": [
payload ={
"headings":
[
{
"heading": "This is a monkey",
"image": {
"img_url": "https://raw.githubusercontent.com/SurveyMonkey/public_api_docs/master/images/presentation.png"
}
}
],
"position": 4,
"family": "presentation",
"subtype": "descriptive_text"
}
请帮忙 您可能正在查找
图像
子类型,有效负载应该更像:
{
"headings": [{
"heading": "This is a monkey",
"image": {
"url": "https://raw.githubusercontent.com/SurveyMonkey/public_api_docs/master/images/presentation.png"
}
}],
"position": 4,
"family": "presentation",
"subtype": "image"
}
请不要将文本分页为图像。请复制粘贴实际文本本身。如何在上面的代码中为“图像”类型的问题添加“答案”字段?有效负载={“标题”:[{“标题”:“这是什么猴子?”,“图像”:{“url”:“}}],“位置”:1,“系列”:“单一选择”,“子类型”:“垂直”,“答案”:{“选择”:[{“文本”:“卷尾猴”},{“文本”:“Mandrill”},],“其他”:[{“文本”:“其他”,“num_chars”:100,“num_行”:3}]}