我正在使用ebay-sdk Python usage documentation。
我得到了这个错误
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())发布于 2018-01-29 06:59:20
所以我在检查样本的时候找到了解决方案。需要添加'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())https://stackoverflow.com/questions/48492133
复制相似问题