timotheus / ebaysdk-python

eBay API SDK for Python
https://developer.ebay.com/tools/sdks
Other
806 stars 326 forks source link

name 'unicode' is not defined on dict2xml with python 3.6 #183

Open meigallodixital opened 7 years ago

meigallodixital commented 7 years ago

When we call AddItems verb, with Additem verb works as expected. Long type is incorrect too, in python 3.

api = Trading(config_file=None, appid=EBAY_APP_ID, devid=EBAY_DEV_ID,
                          certid=EBAY_CERT_ID, token=tiendaebay_data.ebay_token, siteid="186")
            response = api.execute('AddItems', subida)

Exception Location: /usr/local/lib/python3.6/site-packages/ebaysdk/utils.py in dict2xml, line 266

timotheus commented 7 years ago

What version of the SDK are you using?

meigallodixital commented 7 years ago

ebaysdk==2.1.4

We think that the problem is the construction of namevaluelist pairs (our fault sure :P), because if we make xml works:

atributos += '<NameValueList><Name>Brand</Name><Value>{marca}</Value></NameValueList>'.format( marca=replace_ebay(producto.marca))

We think that we send any datatype incorrect and then chek unicode 'or' clausule and fails.