【发布时间】:2018-10-26 04:03:47
【问题描述】:
我有一个使用 ebaysdk 库的 python 代码,当我运行代码并输入关键字进行搜索时,我收到此错误。
Traceback(最近一次调用最后一次):文件“ebay.py”,第 9 行,在 response = api.execute('findItemByKeywords', '53039031') 文件
"/usr/local/lib/python2.7/dist-packages/ebaysdk-2.1.5-py2.7.egg/ebaysdk/connection.py", 第 127 行,在执行中 self.error_check() 文件“/usr/local/lib/python2.7/dist-packages/ebaysdk-2.1.5-py2.7.egg/ebaysdk/connection.py”,
第 223 行,在 error_check 中 raise ConnectionError(estr, self.response) ebaysdk.exception.ConnectionError: u'findItemByKeywords: Internal
服务器错误,域:CoreRuntime,严重性:错误,errorId:2000, 服务操作 findItemByKeywords 未知'
我在 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')
请问我该如何解决这个错误? 提前谢谢....
【问题讨论】:
标签: python linux python-2.7