0

我正在使用ebay-sdk Python 使用文档

我收到这个错误

Exception: Unable to serialize node of type <class 'set'> ({'genuinefeatherbuys2011'})

这是我的代码(我用'x'替换了一些数据)

from ebaysdk.trading import Connection as Trading
from ebaysdk.exception import ConnectionError


key_id  = 'x'
dev_id  = 'x'
cert_id = 'x'
mytoken = 'x'

try:
    api = Trading(appid=key_id, devid=dev_id, certid=cert_id, token=mytoken, config_file=None)
    response = api.execute('GetUser', {'genuinefeatherbuys2011'})
    print(response.dict())
    print(response.reply)
except ConnectionError as e:
    print(e)
    print(e.response.dict())
4

1 回答 1

0

所以我在检查样品时找到了解决方案。'UserID':需要添加的。

请参阅下面的改编代码:

try:
    api = Trading(appid=key_id, devid=dev_id, certid=cert_id, token=mytoken, config_file=None)
    response = api.execute('GetUser', {'UserID': 'sallyma789'})
    print(response.dict())
    print(response.reply)
except ConnectionError as e:
    print(e)
    print(e.response.dict())
于 2018-01-28T22:59:20.267 回答