timotheus / ebaysdk-python

eBay API SDK for Python
https://developer.ebay.com/tools/sdks
Other
807 stars 326 forks source link

Cannot upload image to the Sandbox environment #218

Open vovasolovets opened 7 years ago

vovasolovets commented 7 years ago

Ive tried to upload image using the UploadSiteHostedPictures. Previously everything was fine, but now I get an error with this dictionary { "Ack": "Failure", "Errors": { "ShortMessage": "XML Parse error.", "LongMessage": "XML Error Text: \"java.io.IOException\".", "ErrorCode": "5", "SeverityCode": "Error", "ErrorParameters": { "Value": "java.io.IOException", "_ParamID": "0" }, "ErrorClassification": "RequestError" }, "PictureSystemVersion": "2" } The code to upload image is the following from ebaysdk.trading import Connection as Trading from faker import Faker trade_api = Trading(domain='api.sandbox.ebay.com', appid=_APP_ID, devid=_DEV_ID, certid=_CERT_ID, token=user_token, config_file=None, debug=False, timeout=None) with open(image_path, 'rb') as imagefile: files = {'file': ('EbayImage', imagefile)} faker = Faker() fake_filename = faker.file_name().split('.')[0].capitalize() picture_data = { "WarningLevel": "High", "PictureName": fake_filename, "PictureUploadPolicy": "Add" } response = trade_api.execute('UploadSiteHostedPictures', picture_data, files=files).dict() return response ` Where can be the problem? @timotheus thank you very much for the sdk!

darecAdirondack commented 7 years ago

im having the same problem with the sandbox using 'UploadSiteHostedPictures', i described my issue here: https://github.com/timotheus/ebaysdk-python/issues/219