Python 3.x 使用Python包装器PyPOdio在Podio中创建项
我无法使用PYPODIO2包装器和API在PODIO中创建项目。我已经能够使用OAuth应用程序身份验证成功授权。 下面是我试图执行但遇到错误的代码片段Python 3.x 使用Python包装器PyPOdio在Podio中创建项,python-3.x,api,wrapper,podio,createitem,Python 3.x,Api,Wrapper,Podio,Createitem,我无法使用PYPODIO2包装器和API在PODIO中创建项目。我已经能够使用OAuth应用程序身份验证成功授权。 下面是我试图执行但遇到错误的代码片段 attributes={"fields": {"module-serial": serial_number, "contract-manufacturer-name-2":"Extel", "module-number-and-name":{
attributes={"fields": {"module-serial": serial_number,
"contract-manufacturer-name-2":"Extel",
"module-number-and-name":{
"status": "active",
"text": "BD201: Main Board Extended Build",
"id": 2},
"category":{
"status": "active",
"text": "Pass",
"id": 1}
}
}
pcbapp.Item.create(17174065, attributes)
错误:pypodio2.transport.TransportException:
TransportException({'server':'nginx','date':'2017年2月7日星期二
05:49:05 GMT,“内容类型”:“应用程序/json;字符集=utf-8”,
'内容长度':'259','连接':'保持活动',
“x比率限制剩余”:“989”,“x比率限制剩余”:“1000”,
“x-podio-auth-ref”:“app_17174065”,“x-podio-request-id”:“yUWqV1ao”,
“严格的传输安全性”:“最大年龄=31535999”,“状态”:“400”):
{“error\u参数”:{},“error\u细节”:null,“error\u传播”:false,“请求”:{“url”:”http://api.podio.com/item/app/17174065/“,“查询字符串”:”“方法”:“发布”},“错误描述”:“无效”
值null(null):无效选项”,“错误”:“无效值”}
错误描述:
无效值null(null):无效选项
很可能您的某个字段格式错误。
你应该试着一个接一个地填充它们,找到有问题的一个,然后尝试最后一个的不同格式
我建议您从类别字段模块编号和名称
和类别
开始,并传递如下值:
{
...........
# passing array of id's only, without text and status
"module-number-and-name" : [2],
"category" : [1],
.........
}