Nach Tümmler und immer meine API-Schlüssel und Associate-Tags Ich habe versucht, nach den Anweisungen in diesem Handbuch der Installation: https://github.com/lionheart/bottlenoseurllib.error.HTTPError: HTTP-Fehler 400: Bad Request (Tümmler)
(Ich habe meine api Schlüssel entfernt
)Dies ist der Fehler ich erhalte:
>>> import bottlenose
>>> amazon = bottlenose.Amazon(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ASSOCIATE_TAG)
>>> response = amazon.ItemLookup(ItemId="B007OZNUCE")
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
response = amazon.ItemLookup(ItemId="B007OZNUCE")
File "C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\site-packages\bottlenose\api.py", line 265, in __call__
{'api_url': api_url, 'cache_url': cache_url})
File "C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\site-packages\bottlenose\api.py", line 226, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File"C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 471, in open
response = meth(req, response)
File"C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 581, in http_response
'http', request, response, code, msg, hdrs)
File"C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 509, in error
return self._call_chain(*args)
File"C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 443, in _call_chain
result = func(*args)
File"C:\Users\Windows\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 589, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
Ich habe diese Schlüssel. Ich habe sie entfernt, um diesen Beitrag zu schreiben. Ich wollte meine Schlüssel hier nicht einfügen. – sidni
Ich versuchte es mit einem anderen Beispiel. Ich habe keinen Fehler bekommen. Bitte überprüfen Sie, ob die Artikel-ID vorhanden ist. –
Die Artikel-ID ist vorhanden. Ich denke, das Problem ist mit dem Associate-Tag. Wie kann ich das beheben, wenn dies das Problem ist? – sidni