ArJay
ArJay

Reputation: 80

error_check raise ConnectionError

I have a python code that uses the ebaysdk library, when i run the code and enter a keyword to search i get this error.

Traceback (most recent call last): File "ebay.py", line 9, in response = api.execute('findItemByKeywords', '53039031') File

"/usr/local/lib/python2.7/dist-packages/ebaysdk-2.1.5-py2.7.egg/ebaysdk/connection.py", line 127, in execute self.error_check() File "/usr/local/lib/python2.7/dist-packages/ebaysdk-2.1.5-py2.7.egg/ebaysdk/connection.py",

line 223, in error_check raise ConnectionError(estr, self.response) ebaysdk.exception.ConnectionError: u'findItemByKeywords: Internal

Server Error, Domain: CoreRuntime, Severity: Error, errorId: 2000, Service operation findItemByKeywords is unknown'

I am running it on python2 on ubuntu 17.10 and here is my code sample.

from ebaysdk.finding import Connection as finding
from bs4 import BeautifulSoup

keywords = raw_input('enter your keyword(s) (eg: Television): \n')
api = finding(appid='JamesCan-HiMilesp-PRD-c246ab013-815fa751', config_file = None)
api_request = {'keywords':keywords, 'outputSelector': 'SellerInfo'}

response = api.execute('findItemByKeywords', api_request)
soup = BeautifulSoup(response.content, 'lxml')

totalentries = int(soup.find('totalentries').text)
items = soup.find_all('item')

Please how can i fix this error? Thanks in advance....

Upvotes: 1

Views: 149

Answers (1)

ArJay
ArJay

Reputation: 80

Problem solved. I replaced

response = api.execute('findItemByKeywords', api_request)

with

response = api.execute('findItemsAdvanced', api_request)

and it solved the problem.

Upvotes: 0

Related Questions