8000 InboundShipments:create_inbound_shipment_plan issue (TypeError: quote_from_bytes() expected bytes) · Issue #214 · python-amazon-mws/python-amazon-mws · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

InboundShipments:create_inbound_shipment_plan issue (TypeError: quote_from_bytes() expected bytes) #214

@viavacavi

Description

@viavacavi

Hello,
I have been successfully using the mws package with the orders API. I'm now trying to use the InboundShipments API and I'm running into issues. I've been trying to narrow it down with simple code as such 👍

inboundShipments = mws.InboundShipments(
    access_key=settings.get['az_access_key'], secret_key=settings.get['az_secret_key'],
    account_id=settings.get['az_seller_id'],auth_token=settings.get['az_auth_token']
)
address = {
    "name": settings.get['companyName'],
    "address_1":settings.get['address1'],
    "address_2": settings.get['address2'],
    "city": settings.get['city'],
    "district_or_county": settings.get['district'],
    "state_or_province": settings.get['region'],
    "postal_code": settings.get['postal'],
    "country": settings.get['country']
}
inboundShipments.set_ship_from_address(address)

items=[ {'sku': '012-34-5678', 'quantity': 50},  {'sku': '123-45-6789', 'quantity': 100} ]

inbound.create_inbound_shipment_plan(items,label_preference='SELLER_LABEL')

this yields the following error:
`
File "/usr/local/lib/python3.8/dist-packages/mws/mws.py", line 1045, in create_inbound_shipment_plan
return self.make_request(data, method="POST")
File "/usr/local/lib/python3.8/dist-packages/mws/mws.py", line 229, in make_request
request_description = calc_request_description(params)
File "/usr/local/lib/python3.8/dist-packages/mws/mws.py", line 89, in calc_request_description
encoded_value = quote(params[key], safe='-_.~')
File "/usr/lib/python3.8/urllib/parse.py", line 839, in quote
return quote_from_bytes(string, safe)
File "/usr/lib/python3.8/urllib/parse.py", line 864, in quote_from_bytes
raise TypeError("quote_from_bytes() expected bytes")
TypeError: quote_from_bytes() expected bytes

`

I'm on the latest 0.8.9 installed from Pip

Thanks!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0