OCR problems, reading PDF

ocr
#1

Hi,

I’m getting an error when trying to use the OCR method. I think I’m doing it correctly according to the instructions. I’m trying to make it read an PDF-file and insert it into a string variable. I set the anchor region to the top of the pdf and the text region on the text.

Please see the text and image below. Any idea what’s wrong?

Error executing OcrAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=23,name=Optional[OcrAction],parent=-1,nextSibling=24,arguments=ActionArguments[varName=[pdftext],imageName=[C:\\Users\\h02ewa\\workfusion-workspace\\rpae_project\\Assinment 11 Desktop application automation\\1550492555590-anchor-1550492555814.apng],fullImageName=[1550492555590.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],type=[CONTROL],offsetX=[180],offsetY=[203],delay=[0],width=[895],actionDetails=[(to 'pdftext' rectangle 895 x 635)],height=[635],awaitTimeout=[5000]]]
>       at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
>       at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
>       at java.lang.Thread.run(Thread.java:745)
>   Caused by: org.openqa.selenium.WebDriverException: java.lang.ClassNotFoundException: com.workfusion.desktop.driver.ocr.impl.OcrException cannot be found by com.workfusion.studio.dependencies.rpa-api_9.1.0.0
> Build info: version: '9.1.0.0', revision: 'fd814778f3', time: '2018-08-23T11:59:12.788Z'
> System info: host: 'SEC28754', ip: '10.0.20.210', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
> Driver info: driver.version: RemoteWebDriver
>       at org.openqa.selenium.remote.internal.CustomWrapper.isCustomWrapperElement(CustomWrapper.java:44)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:218)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:351)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:228)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:149)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
>       at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
>       at 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:723)
>       at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:659)
>       at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:109)
>       at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:35)
>       at com.workfusion.rpa.helpers.Ocr$proccessImage.call(Unknown Source)
>       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
>       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
>       at Script3.run(Script3.groovy:8)
>       at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:48)
>       at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:33)
>       at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
>       at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
>       at java.lang.Thread.run(Thread.java:745)
>   Caused by: java.lang.ClassNotFoundException: com.workfusion.desktop.driver.ocr.impl.OcrException cannot be found by com.workfusion.studio.dependencies.rpa-api_9.1.0.0
>       at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
>       at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
>       at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
>       at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:264)
>       at org.openqa.selenium.remote.internal.CustomWrapper.isCustomWrapperElement(CustomWrapper.java:42)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:218)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convertMap(JsonToBeanConverter.java:351)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:228)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:149)
>       at org.openqa.selenium.remote.JsonToBeanConverter.convert(JsonToBeanConverter.java:48)
>       at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
>       at 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:723)
>       at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:659)
>       at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:109)
>       at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:35)
>       at com.workfusion.rpa.helpers.Ocr$proccessImage.call(Unknown Source)
>       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
>       at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
>       at Script3.run(Script3.groovy:8)
>       at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:48)
>       at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:33)
>       at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
>       at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
>       at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
>       at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
>       at java.lang.Thread.run(Thread.java:745)

#2

Perhaps, the OCR license has expired, and you need to update to a newer version of RPA Express.

#3

Oh, probably the case, will update asap, thanks!

1 Like