gpt4 book ai didi

python - error_check 引发 ConnectionError

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:15:20 29 4
gpt4 key购买 nike

我有一个使用 ebaysdk 库的 python 代码,当我运行代码并输入关键字进行搜索时,我得到了这个错误。

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'

我在 ubuntu 17.10 上的 python2 上运行它,这是我的代码示例。

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')

请问我该如何解决这个错误?提前致谢....

最佳答案

问题解决了。我换了

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

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

它解决了这个问题。

关于python - error_check 引发 ConnectionError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53001230/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com