[英]Create Item in Podio Using Python Wrapper PyPOdio
我無法使用PYPODIO2包裝器和API在PODIO中創建項目。 我已經能夠成功使用OAuth應用程序身份驗證進行授權。 以下是我嘗試執行的代碼片段,但遇到錯誤
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':'Tue,07 Feb 2017 05:49:05 GMT','content-type':'application / json; charset = utf-8”,“ content-length”:“ 259”,“ connection”:“ keep-alive”,“ x-rate-limit-remaining”:“ 989”,“ x-rate-limit-limit”:“ 1000”,“ x-podio-auth-ref”:“ app_17174065”,“ x-podio-request-id”:“ yUWqV1ao”,“ strict-transport-security”:“ max-age = 31535999”,“狀態” :'400'}):{“ error_parameters”:{},“ error_detail”:null,“ error_propagate”:false,“ request”:{“ url”:“ http://api.podio.com/item/app / 17174065 /“,” query_string“:”“,”方法“:” POST“},” error_description“:”無效值null(空):無效選項“,” error“:” invalid_value“}
錯誤說明: Invalid value null (null): Not a valid option
您的字段之一很可能格式錯誤。 您應該嘗試將它們一個接一個地填充,以找到有問題的一種,然后為最后一種嘗試不同的格式。
我建議您從類別字段module-number-and-name
以及category
並傳遞值,例如:
{
...........
# passing array of id's only, without text and status
"module-number-and-name" : [2],
"category" : [1],
.........
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.