When trying to use boxdetect in an AWS lambda, this error occurs when deploying:
[ERROR] Runtime.ImportModuleError: Unable to import module 'pd_ocr/handlers/s3_write': libGL.so.1: cannot open shared object file: No such file or directory Traceback (most recent call last):
The error occurs because it is trying to use opencv artifacts necessary for GUI interface which is not needed in a lambda.
Proposed solution: boxdetect should use opencv-python-headless instead of opencv-python. That way these unneeded GUI artifacts are not included allowing boxdetect to be used in a lambda.
When trying to use
boxdetectin an AWS lambda, this error occurs when deploying:[ERROR] Runtime.ImportModuleError: Unable to import module 'pd_ocr/handlers/s3_write': libGL.so.1: cannot open shared object file: No such file or directory Traceback (most recent call last):The error occurs because it is trying to use opencv artifacts necessary for GUI interface which is not needed in a lambda.
Proposed solution:
boxdetectshould useopencv-python-headlessinstead ofopencv-python. That way these unneeded GUI artifacts are not included allowingboxdetectto be used in a lambda.