'ResponseDataObject' object has no attribute 'Ack'

254 views Asked by At

So i'm new to the Python and ebay-api. I'm trying to use GetItem but keep getting the same error with every id given, here's the code:

from ebaysdk.shopping import Connection as Shopping
shopping_api = Shopping(appid='my_api_key', config_file=None)
get_item = shopping_api.execute('GetItem', {'ItemID': '134215887669'})
print(get_item)

Traceback (most recent call last):
  File "C:\Users\User\IdeaProjects\Python3\HelloWorld\ebay_api\gg.py", line 3, in <module>
    get_item = shopping_api.execute('GetItem', {'ItemID': '134215887669'})
  File "C:\Users\User\IdeaProjects\Python3.10\ebay_api\lib\site-packages\ebaysdk\connection.py", line 127, in execute
    self.error_check()
  File "C:\Users\User\IdeaProjects\Python3.10\ebay_api\lib\site-packages\ebaysdk\connection.py", line 219, in error_check
    estr = self.error()
  File "C:\Users\User\IdeaProjects\Python3.10\ebay_api\lib\site-packages\ebaysdk\connection.py", line 335, in error
    error_array.extend(self._get_resp_body_errors())
  File "C:\Users\User\IdeaProjects\Python3.10\ebay_api\lib\site-packages\ebaysdk\shopping\__init__.py", line 249, in _get_resp_body_errors
    if self.response.reply.Ack == 'Failure':
AttributeError: 'ResponseDataObject' object has no attribute 'Ack'
1

There are 1 answers

0
Joe On

GetItem is part of Trading API, not Shopping API family therefore it has different rules, payload, authentication method and endpoint.