Python 瓶鼻ItemLookup生成HTTP响应代码410错误
我有一个Python3.8单元测试,它过去工作得很好,但现在失败了。我看不到任何说明该方法已被弃用的文档,因此我想知道这里发生了什么 单元测试执行以下操作:Python 瓶鼻ItemLookup生成HTTP响应代码410错误,python,boto3,bottlenose,Python,Boto3,Bottlenose,我有一个Python3.8单元测试,它过去工作得很好,但现在失败了。我看不到任何说明该方法已被弃用的文档,因此我想知道这里发生了什么 单元测试执行以下操作: 确保我们实例化了瓶鼻客户端 去查一些产品 当单元测试运行时,输出显示“http410:Gone”错误 这让我抓狂 我确保我是最新的客户 我确保正在查找的项目是有效的 我确保客户端正在实例化 任何其他指针都会有帮助 def test_amazon_client(self): """
def test_amazon_client(self):
"""
Test that amazon client is created.
"""
self.assertIsNotNone(self.amazon)
def test_asin(self):
"""
Test that amazon client is pulling product data.
"""
result = self.amazon.ItemLookup(ItemId="B000Q5Z8L0")
self.assertIsNotNone(result)
======================================================================
ERROR: test_asin (__main__.TestAmazon)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jasoncoulls/Desktop/WORK/[redacted]/scrap.py", line 28, in test_asin
result = self.amazon.ItemLookup(ItemId="B000Q5Z8L0")
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottlenose/api.py", line 273, in __call__
response = self._call_api(api_url,
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/bottlenose/api.py", line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone