我有宽吻亚马逊错误“提高HTTPError(req.full_url,代码,msg,hdrs,fp)urllib.error.HTTPError:HTTP错误400:错误的请求”

时间:2019-06-16 09:16:16

标签: python python-3.x amazon-product-api

我开始将python与Amazon API产品一起使用 为了使这个我用宽吻库 当我使这个我有错误时,ItemLookup 我用XXX替换了实际的ID,标签和密钥以进行解释

import bottlenose
amazon = bottlenose.Amazon("AKIAXXXXXXXXXXXXXXXX",         "BJQJ0WbXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXX-20", MaxQPS=0.7,     Region="US", Timeout=30)
response = amazon.ItemLookup(ItemId="B07BQFX4SB")
print(response)
  File "/usr/local/lib/python3.7/dist-packages/bottlenose/api.py", line 274, in __call__
    {'api_url': api_url, 'cache_url': cache_url})
  File "/usr/local/lib/python3.7/dist-packages/bottlenose/api.py", line 235, in _call_api
    return urllib2.urlopen(api_request, timeout=self.Timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Requ

0 个答案:

没有答案