problem uploading images python3 etsy2 module "The image array metadata doesn't look like a _FILES array

26 views
Skip to first unread message

Simone Onorato

unread,
Aug 6, 2021, 2:22:35 PM8/6/21
to Etsy API
Hello everyone! im almost done developing an app to speed up uploads on etsy.
I am using python3 and the etsy2 module to connect to the etsy api v2.
Im stuck on uploading images. After i successfully authenticate with Oauth, i push this code

listing_id=#a listing id
etsy=#contains oauth
img_link={"image":("image1", open("./test.jpg", "rb"), "image/jpeg") }
etsy.uploadListingImage(listing_id=listing_id, image=img_link)

but i keep getting this error message

ValueError: Could not decode response from Etsy as JSON: status_code: 500, text: "The image array metadata doesn't look like a _FILES array"

Seems like im not writing the img_link variable correctly and so the etsy2 module cant
convert it to json. Anyone had the same problem and could help?

thank you very much everyone!
Reply all
Reply to author
Forward
0 new messages