Can't load tesseract dlls in Azure Function Environment
See original GitHub issueHas anyone tried using Tesseract within Azure Functions? I installed the Tesseract nuget package 3.0.2.0 into my project. I have no issue running the project and loading Tesseract locally, but when I try and run it within the Azure Function container, I get the Failed to find library “liblept172.dll” for platform x86 error. I’ve spoke with a engineer at Microsoft, and they say that the VS C++ 2015 Redist are installed in the environment, and as far as I know, I am copying the DLLs to the correct location.
Here is the stack trace from the exception:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)\r\n
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)\r\n
at System.Activator.CreateInstance(Type type, Object[] args)\r\n
at InteropDotNet.InteropRuntimeImplementer.CreateInstanceT\r\n
at Tesseract.Interop.LeptonicaApi.Initialize()\r\n
at Tesseract.Interop.TessApi.Initialize()\r\n
at Tesseract.Interop.TessApi.get_Native()\r\n
at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode, IEnumerable1 configFiles, IDictionary
2 initialOptions, Boolean setOnlyNonDebugVariables)\r\n
at Tesseract.TesseractEngine…ctor(String datapath, String language, EngineMode engineMode)\r\n
at ClFunctionsOcr.TesseractAPI.TesseractOcr.PerformOcr(List`1 images) in C:\Workspace\CLFunctions\CLFunctions\ClFunctionsOcr\TesseractAPI\TesseractOcr.cs:line 28
Inner Exception:
“Failed to find library "liblept172.dll" for platform x86.”
Anyone else have any trouble with this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
did you ever get thus working in a function app ?
Can you please give me the details here . It would really help if you can attach the function.cs file.
I am trying to run the tessract in azure functions and getting strange issues. I also tried running tesseract.exe in azure function but no luck.