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!
I
ve 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!