sscheetz / etsy-python2

Python access to the Etsy API
http://developer.etsy.com
GNU General Public License v3.0
32 stars 18 forks source link

The image array metadata doesn't look like a _FILES array #14

Open tgey opened 3 years ago

tgey commented 3 years ago

Hi,

Using your package to create listings on Etsy, I tried to upload images with the following code: param = { 'listing_id': listing_id, 'image': '/home/user/link.jpg', 'rank': int(rank) } etsy.uploadListingImage(**param) but I get the following error:

" Could not decode response from Etsy as JSON: status_code: 500, text: "The image array metadata doesn't look like a _FILES array", url 'https://openapi.etsy.com/v2/listings/*listing_id*/images' "

Get the same error for 'image': (filepath, open(filepath, 'rb), 'image/jpeg') format.

What is the format for 'image' param to upload an image ?

Thanks!