我无法使用Podio的Python库。我下载了GitHub存储库来处理它。但却犯了个错误。代码:
from podio.pypodio2.api import OAuthClient
c = OAuthClient(
'************',
'************',
'************',
'************'
)
print(c.domain)
x = lambda x,y: (x,y)
result = c.Item.find(6769, basic=True, handler=x)
print(result, data) #Returned info错误:
Traceback (most recent call last):
File "test.py", line 11, in <module>
result = c.Item.find(6769, basic=True, handler=x)
File "C:\Users\hp\Desktop\podio\pypodio2\areas.py", line 93, in find
return self.transport.GET(url='/item/%d/basic' % item_id)
File "C:\Users\hp\Desktop\podio\pypodio2\transport.py", line 145, in __call__
return handler(response, data)
File "C:\Users\hp\Desktop\podio\pypodio2\transport.py", line 215, in _handle_response
raise TransportException(response, data)
podio.pypodio2.transport.TransportException: TransportException({'server': 'nginx', 'date': 'Wed, 03 Jun 2020 14:22:43 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '279', 'connection': 'keep-alive', 'x-rate-limit-remaining': '999', 'x-rate-limit-limit': '1000', 'x-podio-auth-ref': 'user_5424431', 'x-podio-request-id': 'a5ufc4W3', 'strict-transport-security': 'max-age=31535999', 'status': '403'}): {"error_parameters":{},"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/item\/6769\/basic","query_string":"","method":"GET"},"error_description":"The user with id 5424431 does not have the right view on item with id 6769","error":"forbidden"}这与我与令牌相关的域名有关系吗?如果是这样的话,那么如果我没有从任何服务器运行脚本,请告诉我应该为域设置什么值。
发布于 2020-06-08 05:01:59
您传递的item_id似乎不是真正的6769,或者您无法访问该项。传递正确的item_id并重试。您可以从Podio视图中的item_id Actions菜单中的Developer Info选项中找到。
https://stackoverflow.com/questions/62175324
复制相似问题