在Workfusion RPA Express中使用OCR时“执行OcrAction时出错”。

时间:2018-07-18 11:02:17

标签: ocr workfusion

在Workfusion RPA Express中使用OCR从pdf读取文本时,出现以下错误“错误执行OcrAction”。

执行OcrAction时出错   com.workfusion.studio.rpa.recorder.playback.PlaybackException:执行TemplateAction [templateName = OcrAction.ftl,id = 11,name = Optional [OcrAction],parent = -3,nextSibling = 12,arguments = ActionArguments [varName = [地址],imageName = [C:\ Users \ pandas \ workfusion-workspace \ rpae_project \ Untitled-20 \ 1531908870651-anchor-1531908870677.apng],fullImageName = [1531908870651.png],xsi:type = [recorder:OcrAction,记录器:OcrAction],pollingInterval = [300],active = [true],type = [CONTROL],offsetX = [9],offsetY = [46],delay = [0],width = [165],actionDetails = [ (到“地址”矩形165 x 20),高度= [20],awaitTimeout = [5000]]]       在com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)       在com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:30)       在com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)       在com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)       在com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)       在com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)       在java.lang.Thread.run(Thread.java:745)   引起原因:org.openqa.selenium.WebDriverException:找不到图像:1531908870651-anchor-1531908870677.apng 命令持续时间或超时:0毫秒 生成信息:版本:'9.0.0.1',修订版本:'e3a0fd7071',时间:'2018-05-11T11:35:20.018Z' 系统信息:主机:'CIBL273113',ip:'10 .5.58.158',os.name:'Windows 7',os.arch:'amd64',os.version:'6.1',java.version:'1.8.0_121 ' 驱动程序信息:com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper 功能[{imageSimilarityThreshold = 0.8,extra.executor.id = {Name = RPA Recorder},CLOSE_ALL_WINDOWS = false,browserName = universal,javascriptEnabled = true,extra.capabilities.context = {“ browserType”:“通用”,“ startInPrivate” :false,“ blockImages”:false,“ maximizeOnStartup”:false,“ customCapabilities”:{“ platform”:“ WINDOWS”,“ javascriptEnabled”:true,“ SEARCH_ALL_WINDOWS”:true,“ CLOSE_ALL_WINDOWS”:false,“ imageSimilarityThreshold”: “ 0.8”},“ executorId”:{“名称”:“ RPA记录器”}},platformName = WINDOWS,SEARCH_ALL_WINDOWS = true,platform = WINDOWS}] 会话ID:7363967d-bea5-4e20-b0f6-73fbf34e0cc6       在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)处       在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)       在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)       在java.lang.reflect.Constructor.newInstance(Constructor.java:423)       在org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)       在org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)       在org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:41)       在org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)       在org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)       在org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)       在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:656)       在org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592)       在com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:864)       在com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:930)       在com.workfusion.rpa.helpers.ImageElement.findImageRectangle(ImageElement.java:183)       在com.workfusion.rpa.helpers.ImageElement.getRect(ImageElement.java:86)       在com.workfusion.rpa.helpers.UiElement.getRect(UiElement.java:1025)       在org.openqa.selenium.WebElement $ getRect.call(未知来源)       在org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)       在Script12.run(Script12.groovy:5)       在com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)       在com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)       在com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:35)       在com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)       在com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:30)       在com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)       在com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:53)       在com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153)       在com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:113)       在java.lang.Thread.run(Thread.java:745)   引起原因:java.util.NoSuchElementException:找不到图像:1531908870651-anchor-1531908870677.apng       在sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法)处       在sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)       在sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)       在java.lang.reflect.Constructor.newInstance(Constructor.java:423)       在org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)       在org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)       在org.codehaus.groovy.runtime.callsite.ConstructorSite $ ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)处       在org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)       在Script1 $ 1.call(Script1.groovy:12)       在Script1 $ 1.call(Script1.groovy)       在com.workfusion.common.utils.SynchUtils.withFocusLock(SynchUtils.java:47)       在com.workfusion.common.utils.SynchUtils $ withFocusLock.call中(未知来源)       在org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)       在org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)       在Script1.run(Script1.groovy:5)       在groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)       在groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)       在groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)       在com.workfusion.autoit.driver.AutoItDriver.executeGroovyScript(AutoItDriver.java:243)       在com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:211)       在com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:187)       在com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:149)       在org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)       在org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)       在org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:133)       在org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:203)       在org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98)       在org.openqa.selenium.remote.server.WebDriverServlet.lambda $ handle $ 0(WebDriverServlet.java:231)       在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)       在java.util.concurrent.FutureTask.run(FutureTask.java:266)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)       在java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:1)

您的根本原因是您的例外:

Caused by: org.openqa.selenium.WebDriverException: Image does not found : 1531908870651-anchor-1531908870677.apng

这意味着在OCR操作中,您正在使用锚图像,而在您尝试进行OCR的文档中找不到该图像