0

I am using ebay-sdk Python usage documentation.

I get this error

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

Here is my code (I replaced some data with '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())
Luuklag
  • 3,897
  • 11
  • 38
  • 57
tarek hassan
  • 772
  • 11
  • 35

1 Answers1

0

So I found the solution while checking samples. The 'UserID': needed to be added.

See adapted code below:

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())
Luuklag
  • 3,897
  • 11
  • 38
  • 57
tarek hassan
  • 772
  • 11
  • 35