python-magento
python-magento copied to clipboard
Fault 1062: 'Shipping method is not available'
- Version: 1.9.2.4
- Platform: ubuntu 18
was trying to set cart shipping method but it is giving this error
>>>client.cart_shipping.method(cart_id, {"method":"purchaseorder"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/python-magento/magento/checkout.py", line 371, in method
[quote_id, shipping_method, store_view])
File "/home/python-magento/magento/api.py", line 202, in call
return self.client.call(self.session, resource_path, arguments)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/usr/lib/python3.6/xmlrpc/client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1170, in single_request
return self.parse_response(resp)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1342, in parse_response
return u.close()
File "/usr/lib/python3.6/xmlrpc/client.py", line 656, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1062: 'Shipping method is not available'>
I have checked that this method is available by calling list method
>>>client.cart_shipping.list(cart_id)
[
{
"carrier": "purchaseorder",
"carrier_title": "Purchase Order",
"code": "purchaseorder_fixed",
"method": "fixed",
"method_description": None,
"price": "0.0000",
"error_message": None,
"method_title": "Shipping",
"carrierName": "Purchase Order"
},
{
"carrier": "freeshipping",
"carrier_title": "Shipping is pre-paid with UPS and added to your invoice",
"code": "freeshipping_freeshipping",
"method": "freeshipping",
"method_description": None,
"price": "0.0000",
"error_message": None,
"method_title": None,
"carrierName": "Shipping is pre-paid with UPS and added to your invoice"
}
]
Please help me I have searched many times but could not find anything, please help.