在 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=[(to 'address' rectangle 165 x 20)],height=[20],awaitTimeout=[5000]]] at 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 Capabilities [{imageSimilarityThreshold=0.8, extra.executor.id={ Name=RPA Recorder}, CLOSE_ALL_WINDOWS=false, browserName=universal, javascriptEnabled=true, extra.capabilities.context={"browserType":"universal","startInPrivate":false,"blockImages":false,"maximizeOnStartup":false ,"customCapabilities":{"platform":"WINDOWS","javascriptEnabled":true,"SEARCH_ALL_WINDOWS":true,"CLOSE_ALL_WINDOWS":false,"imageSimilarityThreshold":"0.8"},"executorId":{"Name": “RPA 记录器”}},平台名称=WINDOWS,SEARCH_ALL_WINDOWS=true,platform=WINDOWS}] 会话 ID:7363967d-bea5-4e20-b0f6-73fbf34e0cc6 在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) 的 java.lang.reflect.Constructor.newInstance(Constructor.java:423) 的 .newInstance(DelegatingConstructorAccessorImpl.java:45) org.openqa。 selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:41) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode( AbstractHttpResponseCodec.java:82) 在 org.openqa。selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver. java:656) at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592) at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:864) at 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.codehaus.groovy.runtime 的 org.openqa.selenium.WebElement$getRect.call(Unknown Source)。callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.call(AbstractCallSite.java:113) java:117) 在 com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90) 在 com.workfusion.studio.rpa.recorder 的 Script12.run(Script12.groovy:5) .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。在 com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17) 在 com.workfusion.studio.rpa.recorder.playback.player 执行(TemplateAction.java:30)。 ActionPlayer.next(ActionPlayer.java:53) at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:153) at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run( PlaybackLogic.java:113) at java.lang.Thread.run(Thread.java:745) 原因:java.util.NoSuchElementException:找不到图像:1531908870651-anchor-1531908870677.apng at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (本机方法)在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl。newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83) at org.codehaus.groovy .reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84) at 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(Unknown Source) 在 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) 在 groovy.lang.GroovyShell.evaluate(GroovyShell.java:623) 在 groovy.lang.GroovyShell.evaluate(GroovyShell.java:585) 在 Script1.run(Script1.groovy:5) 在 groovy.lang.GroovyShell。在 com.workfusion.autoit.driver.AutoItDriver.executeGroovyScript(AutoItDriver.java:243) 在 com.workfusion.autoit.driver.AutoItDriver 评估(GroovyShell.java:594)。executeScript(AutoItDriver.java:211) at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:187) at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:149) at 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)