我正在尝试将以下包装用于eBay API:http://code.google.com/p/ebay-sdk-python/
但是,当我执行以下代码时,我将获得:
from ebaysdk import finding, tag, nodeText
f = finding()
f.execute('findItemsAdvanced', tag('keywords', 'shoes'))
Traceback (most recent call last):
File "/home/unix/dfernand/bin/lib/python2.7/site-packages/ebaysdk-0.1.6-py2.7.egg/ebaysdk/__init__.py", line 141, in execute
self._response_content = self._execute_http_request()
File "/home/unix/dfernand/bin/lib/python2.7/site-packages/ebaysdk-0.1.6-py2.7.egg/ebaysdk/__init__.py", line 244, in _execute_http_request
raise Exception("%s" % e)
Exception: Internal Server Error
然后尝试获取更多信息,但没有任何有意义的出现:
error = f.error()
print error
findItemsAdvanced error:
Exception: Internal Server Error
我不确定错误来自何处 - 我尝试将YAML文件复制到安装模块的鸡蛋文件的位置(即,/home/unix/dfernand/bin/bin/lib/lib/python2.7/site-packages/),没有任何改变。
我用沙盒密钥填充了yaml文件,然后尝试用生产键填充它,然后更改了名称以匹配eBay开发人员帐户中的名称等。我对正在发生的事情毫无意义。有任何想法吗?谢谢。
我的yaml文件的示例:
# ebaysdk API Configurations
name: Key Set 1 #(note: here i changed it to Key Set 1, name in ebay website from ebay_api_config)
# Trading - External
api.ebay.com:
password: _password_
username: _username_
appid: myproduction-appid-fromdeveloperssite
certid: _certid_
devid: _devid_
token:
version: 671
https: 1
# Shopping
open.api.ebay.com:
appid: myproduction-appid-fromdeveloperssite
certid: myproduction-certid-fromdeveloperssite
devid: myproduction-devid-fromdeveloperssite
version: 671
# Finding/Merchandising
svcs.ebay.com:
appid: myprodction-appid-fromdeveloperssite
version: 1.0.0
尝试升级到最新版本。我添加了很多错误处理会有所帮助。
https://github.com/timotheus/ebaysdk-python
from ebaysdk import finding
api = finding(appid='YOUR_APPID_HERE', debug=True)
api.execute('findItemsAdvanced', {'keywords': 'shoes'})
print api.response_dict()
添加debug = true将转储HTTP请求/响应。如果您仍然遇到麻烦,请传递请求/响应。