{"action":"created","issue":{"url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/125","repository_url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api","labels_url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/125/comments","events_url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/125/events","html_url":"https://github.com/yoavaviram/python-amazon-simple-product-api/issues/125","id":264583421,"number":125,"title":"how to lookup with upc code ","user":{"login":"pawanvirsingh","id":12862906,"avatar_url":"https://avatars2.githubusercontent.com/u/12862906?v=4","gravatar_id":"","url":"https://api.github.com/users/pawanvirsingh","html_url":"https://github.com/pawanvirsingh","followers_url":"https://api.github.com/users/pawanvirsingh/followers","following_url":"https://api.github.com/users/pawanvirsingh/following{/other_user}","gists_url":"https://api.github.com/users/pawanvirsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/pawanvirsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawanvirsingh/subscriptions","organizations_url":"https://api.github.com/users/pawanvirsingh/orgs","repos_url":"https://api.github.com/users/pawanvirsingh/repos","events_url":"https://api.github.com/users/pawanvirsingh/events{/privacy}","received_events_url":"https://api.github.com/users/pawanvirsingh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-11T13:19:31Z","updated_at":"2017-10-12T13:32:45Z","closed_at":null,"author_association":"NONE","body":">>> product = amazon.lookup(['841667112640'], SearchIndex='Books',IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python2.7/dist-packages/amazon/api.py\", line 180, in lookup\r\n    \"Amazon Product Lookup Error: '{0}', '{1}'\".format(code, msg))\r\namazon.api.LookupException: Amazon Product Lookup Error: 'AWS.InvalidEnumeratedParameter', 'The value you specified for ResponseGroup is invalid. Valid values include [\r\n    \t\t'Tags', 'Help', 'ListMinimum', 'VariationSummary', 'VariationMatrix',\r\n    \t\t'TransactionDetails', 'VariationMinimum', 'VariationImages',\r\n    \t\t'PartBrandBinsSummary', 'CustomerFull', 'CartNewReleases',\r\n    \t\t'ItemIds', 'SalesRank', 'TagsSummary', 'Fitments',\r\n    \t\t'Subjects', 'Medium', 'ListmaniaLists',\r\n    \t\t'PartBrowseNodeBinsSummary', 'TopSellers', 'Request',\r\n    \t\t'HasPartCompatibility', 'PromotionDetails', 'ListFull',\r\n    \t\t'Small', 'Seller', 'OfferFull', 'Accessories',\r\n    \t\t'VehicleMakes', 'MerchantItemAttributes', 'TaggedItems',\r\n    \t\t'VehicleParts', 'BrowseNodeInfo', 'ItemAttributes',\r\n    \t\t'PromotionalTag', 'VehicleOptions', 'ListItems', 'Offers',\r\n    \t\t'TaggedGuides', 'NewReleases', 'VehiclePartFit',\r\n    \t\t'OfferSummary', 'VariationOffers', 'CartSimilarities',\r\n    \t\t'Reviews', 'ShippingCharges', 'ShippingOptions', 'EditorialReview',\r\n    \t\t'CustomerInfo', 'PromotionSummary', 'BrowseNodes',\r\n    \t\t'PartnerTransactionDetails', 'VehicleYears', 'SearchBins',\r\n    \t\t'VehicleTrims', 'Similarities', 'AlternateVersions',\r\n    \t\t'SearchInside', 'CustomerReviews', 'SellerListing',\r\n    \t\t'OfferListings', 'Cart', 'TaggedListmaniaLists',\r\n    \t\t'VehicleModels', 'ListInfo', 'Large', 'CustomerLists',\r\n    \t\t'Tracks', 'CartTopSellers', 'Images', 'Variations',\r\n    \t'RelatedItems','Collections'\r\n    \t].'\r\n>>> product = amazon.lookup(['841667112640'],OfferFull,IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nNameError: name 'OfferFull' is not defined\r\n>>> product = amazon.lookup(['841667112640'],'OfferFull',IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: lookup() takes at most 2 arguments (4 given)\r\n>>> product = amazon.lookup(['841667112640'],ResponseGroup='OfferFull',IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: lookup() got multiple values for keyword argument 'ResponseGroup'\r\n>>> product = amazon.lookup(['841667112640'],ResponseGroup='OfferFull',IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: lookup() got multiple values for keyword argument 'ResponseGroup'\r\n>>> product = amazon.lookup('841667112640',IdType=\"UPC\")\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python2.7/dist-packages/amazon/api.py\", line 180, in lookup\r\n    \"Amazon Product Lookup Error: '{0}', '{1}'\".format(code, msg))\r\namazon.api.LookupException: Amazon Product Lookup Error: 'AWS.InvalidEnumeratedParameter', 'The value you specified for ResponseGroup is invalid. Valid values include [\r\n    \t\t'Tags', 'Help', 'ListMinimum', 'VariationSummary', 'VariationMatrix',\r\n    \t\t'TransactionDetails', 'VariationMinimum', 'VariationImages',\r\n    \t\t'PartBrandBinsSummary', 'CustomerFull', 'CartNewReleases',\r\n    \t\t'ItemIds', 'SalesRank', 'TagsSummary', 'Fitments',\r\n    \t\t'Subjects', 'Medium', 'ListmaniaLists',\r\n    \t\t'PartBrowseNodeBinsSummary', 'TopSellers', 'Request',\r\n    \t\t'HasPartCompatibility', 'PromotionDetails', 'ListFull',\r\n    \t\t'Small', 'Seller', 'OfferFull', 'Accessories',\r\n    \t\t'VehicleMakes', 'MerchantItemAttributes', 'TaggedItems',\r\n    \t\t'VehicleParts', 'BrowseNodeInfo', 'ItemAttributes',\r\n    \t\t'PromotionalTag', 'VehicleOptions', 'ListItems', 'Offers',\r\n    \t\t'TaggedGuides', 'NewReleases', 'VehiclePartFit',\r\n    \t\t'OfferSummary', 'VariationOffers', 'CartSimilarities',\r\n    \t\t'Reviews', 'ShippingCharges', 'ShippingOptions', 'EditorialReview',\r\n    \t\t'CustomerInfo', 'PromotionSummary', 'BrowseNodes',\r\n    \t\t'PartnerTransactionDetails', 'VehicleYears', 'SearchBins',\r\n    \t\t'VehicleTrims', 'Similarities', 'AlternateVersions',\r\n    \t\t'SearchInside', 'CustomerReviews', 'SellerListing',\r\n    \t\t'OfferListings', 'Cart', 'TaggedListmaniaLists',\r\n    \t\t'VehicleModels', 'ListInfo', 'Large', 'CustomerLists',\r\n    \t\t'Tracks', 'CartTopSellers', 'Images', 'Variations',\r\n    \t'RelatedItems','Collections'\r\n    \t].'\r\n>>> product = amazon.lookup('841667112640',IdType=\"UPC\")\r\n"},"comment":{"url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/comments/336138344","html_url":"https://github.com/yoavaviram/python-amazon-simple-product-api/issues/125#issuecomment-336138344","issue_url":"https://api.github.com/repos/yoavaviram/python-amazon-simple-product-api/issues/125","id":336138344,"user":{"login":"pawanvirsingh","id":12862906,"avatar_url":"https://avatars2.githubusercontent.com/u/12862906?v=4","gravatar_id":"","url":"https://api.github.com/users/pawanvirsingh","html_url":"https://github.com/pawanvirsingh","followers_url":"https://api.github.com/users/pawanvirsingh/followers","following_url":"https://api.github.com/users/pawanvirsingh/following{/other_user}","gists_url":"https://api.github.com/users/pawanvirsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/pawanvirsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawanvirsingh/subscriptions","organizations_url":"https://api.github.com/users/pawanvirsingh/orgs","repos_url":"https://api.github.com/users/pawanvirsingh/repos","events_url":"https://api.github.com/users/pawanvirsingh/events{/privacy}","received_events_url":"https://api.github.com/users/pawanvirsingh/received_events","type":"User","site_admin":false},"created_at":"2017-10-12T13:32:45Z","updated_at":"2017-10-12T13:32:45Z","author_association":"NONE","body":"got it \r\n\r\nproduct_upc = [\"037000886341\",\"191565722329\",\"791484313365\",\"024182181562\"]\r\nfor upc in product_upc:\r\n\ttime.sleep(2)\r\n\ta = {'ItemId':upc,'IdType':'UPC','SearchIndex':'All'}\r\n\ttry:\r\n\t\tproducts = amazon.lookup(**a)\r\n\t\tprint products[0]"}}
{"actor":{"display_login":"pawanvirsingh"}}