Closed johnml1135 closed 1 year ago
I've encountered this error before. I think this is the error thrown when you give it no source or target files (???). I'll verify. If so, just wrap it and throw something more meaningful?
Note that all three files failed to upload with the same error: train.src.txt, train.trg.txt and pretranslate.src.json.
Yes, this error is the result of submitting a source file that is completely empty. Catch and throw something more descriptive @johnml1135? Or check if the source is empty earlier on?
I think we should just handle an empty file properly in S3WriteStream
. On dispose if there are no parts uploaded, then abort the multipart upload and call PutObjectAsync
with an empty file. Alternatively, only initiate the multipart upload on the first call to WriteAsync
. This would avoid the need to abort the multipart upload.
It appears there is an issue with the multi-part upload. This may be of help: https://stackoverflow.com/questions/45727244/malformedxml-the-xml-you-provided-was-not-well-formed-or-did-not-validate-again.