Boto MWS Error One or more parameter values in the request is invalid. Invalid ids presented

时间:2015-07-28 22:23:40

标签: python boto amazon-mws

I am getting an error when trying to list out my orders using the boto mws api. Here is the error code:

InvalidParameterValue
Traceback (most recent call last):
  File "order-list.py", line 10, in <module>
    order = mws.list_orders(MarketplaceId=marketplaceId, CreatedAfter='2013-01-10', OrderStatus=orderstatus)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 158, in requires
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 158, in requires
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 177, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 196, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 177, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 196, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 177, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 139, in wrapper
    return func(*args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 81, in wrapper
    return func(self, *args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 252, in wrapper
    return func(self, request, response, *args, **kw)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 732, in list_orders
    return self._post_request(request, kw, response)
  File "/Users/brandon/Envs/Amazon-Seller/lib/python2.7/site-packages/boto/mws/connection.py", line 323, in _post_request
    response.reason, body)
boto.mws.exception.InvalidParameterValue: InvalidParameterValue: Bad Request 
One or more parameter values in the request is invalid.
Invalid ids presented

Here is my code:

from boto.mws.connection import MWSConnection

merchantId = "XXX"
marketplaceId = "XXX"
accessKeyId = "XXX"
secretKey = "XXX"
mws = MWSConnection(accessKeyId,secretKey,Merchant=merchantId)
orderstatus = ['PartiallyShipped','Unshipped', ]
order = mws.list_orders(MarketplaceId=marketplaceId, CreatedAfter='2013-01-10', OrderStatus=orderstatus)
print order

Can someone out there explain what parameter value is invalid in my request?

1 个答案:

答案 0 :(得分:3)

经过大量研究后,我能够确定我的MarketplaceId必须是一个列表而不是字符串。这篇文章有助于搞清楚。

How can I return XML from boto calls?

布兰登