Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Lambda Function Errors #12

Open
davidjwriter opened this issue Aug 14, 2023 · 1 comment
Open

AWS Lambda Function Errors #12

davidjwriter opened this issue Aug 14, 2023 · 1 comment

Comments

@davidjwriter
Copy link

I'm using rusty-tesseract with a rust lambda function and I'm getting some strange results.

When I run everything locally it works great, super easy to use!

But as soon as I deploy to an AWS Lambda, it breaks with this error:

thread 'main' panicked at 'called Result::unwrap()on anErr value: CommandExitStatusError("exit status: 1", "Error in pixCreateNoInit: pixdata_malloc fail for data\nError in pixCreateTemplateNoInit: pixd not made\nError in pixCreateTemplate: pixd not made\nError in pixCopy: pixd not made\nError in pixGetDepth: pix not defined\nError in pixGetWpl: pix not defined\nError in pixGetYRes: pix not defined\nError in pixClone: pixs not defined\nPlease call SetImage before attempting recognition.\nError during processing.\n")', src/main.rs:158:74

I am deploying using Lambda Layers with pre-built Tesseract binaries. I have tried this with Tesseract v4 and v5 but get the same error each time. Here are the versions I've tried with:

The tesseract version is: "tesseract 4.1.3\n leptonica-1.82.0\n libjpeg 6b (libjpeg-turbo 2.0.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0\n Found AVX2\n Found AVX\n Found FMA\n Found SSE\n"

And also v5:

The tesseract version is: "tesseract 5.3.2\n leptonica-1.83.1\n libjpeg 6b (libjpeg-turbo 2.0.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0\n Found AVX2\n Found AVX\n Found FMA\n Found SSE4.1\n Found OpenMP 201511\n"

It is definitely a possible Lambda environment issue I haven't figured out yet, but I wanted to put this out there in case there is something else going on that you may want to know about.

@thomasgruebl
Copy link
Owner

Hi, thanks for raising this issue.

Would this tool help you?

bweigel/aws-lambda-tesseract-layer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants