minio.error.InvalidXMLError while performing fput_object
See original GitHub issueI am using the Minio SDK for Python. I am performing the method fput_object
and I keep running into the error:
InvalidXMLError: message: "Error" XML is not parsable. Message: mismatched tag: line 6, column 2
.
The following code is being used:
minioClient = Minio(minio_server_url, access_key=access_key, secret_key=secret_key, secure=True)
result = minioClient.fput_object(bucket_name, filename, content_file, content_type='application/csv')
print(result)
The line it errors on is: result = minioClient.fput_object(...)
The content_file
is the file path to the file I want to upload to my bucket. This has worked with other files, but on the file I am trying it errors out. The contents of the file is just CSV data - about 4.5MB worth. The files that worked are probably only about 2MB worth of data.
The full traceback is here:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/minio/error.py", line 175, in _set_error_response_with_body
root = cElementTree.fromstring(self._response.data)
File "/usr/local/lib/python3.7/xml/etree/ElementTree.py", line 1315, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: mismatched tag: line 6, column 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/minio/api.py", line 632, in fput_object
progress, part_size)
File "/usr/local/lib/python3.7/site-packages/minio/api.py", line 899, in put_object
progress=progress)
File "/usr/local/lib/python3.7/site-packages/minio/api.py", line 1618, in _do_put_object
content_sha256=sha256_hex
File "/usr/local/lib/python3.7/site-packages/minio/api.py", line 1967, in _url_open
object_name).get_exception()
File "/usr/local/lib/python3.7/site-packages/minio/error.py", line 137, in __init__
self._handle_error_response(bucket_name)
File "/usr/local/lib/python3.7/site-packages/minio/error.py", line 160, in _handle_error_response
self._set_error_response_with_body(bucket_name)
File "/usr/local/lib/python3.7/site-packages/minio/error.py", line 178, in _set_error_response_with_body
'Message: {0}'.format(error))
minio.error.InvalidXMLError: InvalidXMLError: message: "Error" XML is not parsable. Message: mismatched tag: line 6, column 2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
minio/minio - Gitter
Does MinIO have plans to expose the metrics and API for the users to understand bucket storage capacity and available size? When using...
Read more >JavaScript Quickstart Guide — MinIO Object Storage for Linux
This quickstart guide will show you how to install the client SDK and execute an example JavaScript program. For a complete list of...
Read more >minio - Go Packages
FPutObject - Create an object in a bucket, with contents from file at filePath. Allows request cancellation. func (*Client) GetBucketEncryption ¶. func (c...
Read more >InvalidXMLError: message: "BucketLocationConstraintResult ...
I fire up MySQL and MinIO as services using docker-compose and set up ... as error: /usr/lib/python3.8/xml/etree/ElementTree.py in XML(text, ...
Read more >Upload Files To A Minio Object Storage Cloud With Node.js ...
fPutObject ("test", request.file.originalname, request.file.path, "application/octet-stream", function(error, etag) { if ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Your nginx ingress should have the following settings https://docs.minio.io/docs/setup-nginx-proxy-with-minio.html
@kannappanr Looks like this was an issue with my ingress rule. My Minio instance was deployed as a container inside a kubernetes cluster. The ingress controller was throttling the request size, so by setting the
client_max_body_size
on my ingress rule it worked.For those who don’t know kubernetes, you would set that via an annotation field on the ingress rule like so:
I am testing some more just to be sure, before closing this ticket.