【问题标题】:eBay Python SDK 'findItemsAdvanced' call returns Internal Server ErroreBay Python SDK“findItemsAdvanced”调用返回内部服务器错误
【发布时间】:2012-10-23 19:57:51
【问题描述】:

我正在尝试为 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 file 复制到安装模块的 egg 文件的位置(即 /home/unix/dfernand/bin/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

【问题讨论】:

    标签: python ebay-api ebay-sdk


    【解决方案1】:

    尝试升级到最新版本。我添加了许多有助于解决问题的错误处理。

    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 请求/响应。如果您仍然遇到问题,请传递请求/响应。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-16
      • 1970-01-01
      • 1970-01-01
      • 2020-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多