redtoad / python-amazon-product-api

A Python wrapper for the Amazon Product Advertising API. This module offers a light-weight access to the latest version of the Amazon Product Advertising API without getting in your way.
https://pypi.org/project/python-amazon-product-api/
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

VehiclePartLookup operation raises InvalidOperationForMarketplace error #9

Closed redtoad closed 14 years ago

redtoad commented 14 years ago

Originally reported by Anonymous


I ran this code to try the VehiclePartLookup operation:

#!python
api = API(AWS_KEY, SECRET_KEY)
url = api._build_url(Operation='VehiclePartLookup')
fp = api._call(url)
print api._parse(fp)

and got this error:

#!pytb
Traceback (most recent call last):
  File "/home/jeff/Desktop/vehicle-lookup.py", line 8, in <module>
    print api._parse(fp)
  File "/home/jeff/.local/lib/python2.6/site-packages/amazonproduct.py", line 324, in _parse
    raise AWSError(error.Code.text, error.Message.text)
amazonproduct.AWSError: AWS.InvalidOperationForMarketplace: This operation, VehiclePartLookup is not available for this locale.

redtoad commented 14 years ago

Original comment by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)


I'm closing this since support for it will cease Nov 8th anyway and I'm not going to get it implemented before then.

redtoad commented 14 years ago

Original comment by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)


Bad News! Amazon plans to cease support for a number of operations due to low usage. VehiclePartLookup, VehiclePartSearch and VehicleSearch are among them.

https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html

redtoad commented 14 years ago

Original comment by Sebastian Rahlf (Bitbucket: basti, GitHub: basti)


I haven't yet implemented the VehiclePartLookup operation but it seems that it is limited to locale US only. I'll implement an exception to handle this case and I also have to think of some clever way of running tests for multiple locales.