cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Strange ItemSpecifics Error with eBay API

I was posting a listing and got an error that a couple ItemSpecifics were needed:

 

'AddItem: Class: RequestError, Severity: Error, Code: 21919303, The item specific Sport\xa0is missing. The item specific Sport\xa0is missing.\xa0Add Sport to this listing, enter a valid value, and then try again., Class: RequestError, Severity: Error, Code: 21919303, The item specific Graded\xa0is missing. The item specific Graded\xa0is missing.\xa0Add Graded to this listing, enter a valid value, and then try again.'

 

So I added the appropriate lines to my code but then received this error:

 

  File "/Users/jay/Desktop/Random Docs/eBay Selling/eBay - Baseball Cards/list_item.py", line 36, in addItem

    myitem["Item"]["ItemSpecifics"]["NameValueList"].append({'Name': 'Sport', 'Value': row[9]})

 

I have verified that my data is correct (it's reading the string 'Baseball' for row[9]) -- so I have no idea why I'm getting this error. Can someone please help?

Message 1 of 3
latest reply
2 REPLIES 2

Strange ItemSpecifics Error with eBay API

1st error is from the api, but the 2nd error appears to be part of an error from python, do you have the rest of the surrounding error on the 2nd one?

 

guesses:

if run just prior to line 36

does print(type(myitem["Item"]["ItemSpecifics"]["NameValueList"])) print <class 'list'>

does print(row[9]) print Baseball

Message 2 of 3
latest reply

Strange ItemSpecifics Error with eBay API

It looks like the error is related to the data structure you are using to add the Item Specifics to your eBay listing. Based on the error message you provided, it seems that you are trying to append the "Sport" and "Graded" Item Specifics to the "NameValueList" element of the "ItemSpecifics" object.

However, it's possible that the "NameValueList" element doesn't exist yet or is empty, which could cause the error you're seeing. To fix this, you can try initializing the "NameValueList" element as an empty list before appending the Item Specifics to it. Here's an example of how you can modify your code to do this: myitem["Item"]["ItemSpecifics"] = {}
myitem["Item"]["ItemSpecifics"]["NameValueList"] = []
myitem["Item"]["ItemSpecifics"]["NameValueList"].append({'Name': 'Sport', 'Value': row[9]})
myitem["Item"]["ItemSpecifics"]["NameValueList"].append({'Name': 'Graded', 'Value': row[10]})
This code first initializes the "ItemSpecifics" object as an empty dictionary, then initializes the "NameValueList" element as an empty list, and finally appends the "Sport" and "Graded" Item Specifics to the list.

Make sure to adjust the indices in the "Value" fields if the "Sport" and "Graded" values are located in different columns of your data.

 

My Ascension

Message 3 of 3
latest reply