2012-06-12 4 views
0

Amazon Product API에 병목을 사용하고 있습니다. 나는 단순히 몇 가지 코드를 생성하고 아래의 오류를 만났다 : 내가 만든병목 현상이있는 Amazon Product API에 관한 오류

코드 :

Traceback (most recent call last): 
    File "C:/Python27/amazontest", line 6, in <module> 
    response=amazon.ItemLookup(ItemId="0596520999", ResponseGroup="Images", SearchIndex="Books", IdType="ISBN",Style="http://xml2json-xslt.googlecode.com/svn/trunk/xml2json.xslt") 
    File "C:\Users\supercoco\AppData\Roaming\Python\Python27\site-packages\bottlenose\api.py", line 104, in __call__ 
    response = urllib2.urlopen(api_request) 
    File "C:\Python27\lib\urllib2.py", line 126, in urlopen 
    return _opener.open(url, data, timeout) 
    File "C:\Python27\lib\urllib2.py", line 400, in open 
    response = meth(req, response) 
    File "C:\Python27\lib\urllib2.py", line 513, in http_response 
    'http', request, response, code, msg, hdrs) 
    File "C:\Python27\lib\urllib2.py", line 438, in error 
    return self._call_chain(*args) 
    File "C:\Python27\lib\urllib2.py", line 372, in _call_chain 
    result = func(*args) 
    File "C:\Python27\lib\urllib2.py", line 521, in http_error_default 
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 
HTTPError: HTTP Error 400: Bad Request 

사람이 문제가 무엇인지 알고 있나요 :

여기
ak = "my access key" 
sk = "My secret key" 

import bottlenose 
amazon = bottlenose.Amazon(ak, sk) 
response=amazon.ItemLookup(ItemId="0596520999", ResponseGroup="Images", SearchIndex="Books", IdType="ISBN",Style="http://xml2json-xslt.googlecode.com/svn/trunk/xml2json.xslt") % reference from the README file of bottlenose 

은 내가 가진 오류는? 나는 당신의 대답을 appreicate! 서비스 태그 :

amazon = bottlenose.Amazon(ak, sk) 

에서

감사

-CC

답변

0

당신은 세 번째 매개 변수를 추가해야합니다.

amazon = bottlenose.Amazon(ak, sk, service_tag) 
관련 문제