微软Power Automate 使用OCR引擎报错未能创建 OCR 引擎

微软Power Automate 使用OCR引擎报错未能创建 OCR 引擎

调用的目标发生了异常。: Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: 未能创建 OCR 引擎 ---> System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.DllNotFoundException: Failed to find library "tesseract41.dll" for platform x64.
   在 InteropDotNet.LibraryLoader.LoadLibrary(String fileName, String platformName)
   在 InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation..ctor(LibraryLoader loader)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   在 System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   在 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   在 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   在 System.Activator.CreateInstance(Type type, Object[] args)
   在 InteropDotNet.InteropRuntimeImplementer.CreateInstance[T]()
   在 Tesseract.Interop.TessApi.Initialize()
   在 Tesseract.Interop.TessApi.get_Native()
   在 Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerable`1 configFiles, IDictionary`2 initialOptions, Boolean setOnlyNonDebugVariables)
   在 Microsoft.Flow.RPA.Desktop.Modules.OCR.Utilities.Variants.TesseractOCREngineFacadeToVariant..ctor(OCRTesseractLanguage language, String dataPath, String otherLanguageAbbreviation, Int32 imageWidthMultiplier, Int32 imageHeightMultiplier)
   在 Microsoft.Flow.RPA.Desktop.Modules.OCR.Utilities.OCREngineFactory.Create(OCREngineSetUp ocrEngineSetUp, String language, Int32 imageHeightMultiplier, Int32 imageWidthMultiplier, String languageAbbreviation, FolderObject languageDataPath)
   在 Microsoft.Flow.RPA.Desktop.Modules.OCR.Utilities.OCRActionBase.Execute(ActionContext context)
   --- 内部异常堆栈跟踪的结尾 ---
   在 Microsoft.Flow.RPA.Desktop.Modules.OCR.Utilities.OCRActionBase.Execute(ActionContext context)
   在 Microsoft.Flow.RPA.Desktop.Modules.OCR.Actions.ExtractTextWithOCRBase.Execute(ActionContext context)
   在 Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

查询一些方法后了解到是环境问题,需要安装VS2019,下载链接:

Latest supported Visual C++ Redistributable downloads | Microsoft Learn

进行安装,这里微软把2015-2022的环境进行了打包

问题解决

参考链接:

Failed to find library "tesseract41.dll" for platform x64. · Issue #493 · charlesw/tesseract · GitHub

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值