Textract detect_document_text method from boto3 package is erroring out in my local machine only on images of a certain size. It responds with a super cryptic message, so I am at a loss how to debug this further. The documentation doesn't indicate that there are any other parameters that I can pass through.
I am attempting to pass the image bytes directly to the method call
client.detect_document_text(
Document={
'Bytes': img,
}
)
Variable img
is a bytes array img = b'...'
and of size len(img) == 22023165
. The image is 2.4 MB.