OCR error in all my RPA recordings

I keep getting this error when I try to run OCR tasks. What can I do?

Error executing OcrAction
      com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=9,name=Optional[OcrAction],parent=2,nextSibling=10,arguments=ActionArguments[varName=[ocr],imageName=[C:\\Users\\Admin\\workfusion-workspace\\rpae_project\\ocr_keys_test\\1519896659509-anchor-1519896659755.apng],fullImageName=[1519896659509.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],offsetX=[24],delay=[500],offsetY=[241],width=[464],actionDetails=[(to 'ocr' rectangle 24 x 241)],height=[111],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:30)
          at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
          at com.workfusion.studio.rpa.recorder.playback.player.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)
      Caused by: org.openqa.selenium.WebDriverException: 500 Internal Server Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><message>Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [C:\Users\Admin\AppData\Local\Temp\tomcat.5625868269135739259.15580\work\Tomcat\localhost\ROOT] is not valid</message></error>
    Command duration or timeout: 709 milliseconds
    Build info: version: '8.4.5', revision: 'f4260441345d31500d1587ee0abfdfcd20e3a66a', time: '2017-12-18 09:30:31'
    System info: host: 'Admin-Pc', ip: '172.20.29.134', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
    Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
    Capabilities [{imageSimilarityThreshold=0.8, webdriver.remote.sessionid=3e9d0ace-2e7d-47b7-be71-0164d3271d48, CLOSE_ALL_WINDOWS=true, browserName=universal, takesScreenshot=true, javascriptEnabled=true, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
    Session ID: 3e9d0ace-2e7d-47b7-be71-0164d3271d48
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
          at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
          at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
          at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
          at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:720)
          at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:768)
          at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:90)
          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 Script9.run(Script9.groovy:5)
          at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
          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:35)
          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:30)
          at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
          at com.workfusion.studio.rpa.recorder.playback.player.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)
      Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
    Build info: version: '8.4.5', revision: 'f4260441345d31500d1587ee0abfdfcd20e3a66a', time: '2017-12-18 09:30:31'
    System info: host: 'Admin-Pc', ip: '172.20.29.134', 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.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:138)
          at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
          at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
          at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:720)
          at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:768)
          at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:90)
          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 Script9.run(Script9.groovy:5)
          at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
          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:35)
          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:30)
          at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
          at com.workfusion.studio.rpa.recorder.playback.player.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)
      Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: 500 Internal Server Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><message>Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [C:\Users\Admin\AppData\Local\Temp\tomcat.5625868269135739259.15580\work\Tomcat\localhost\ROOT] is not valid</message></error>
    Build info: version: '8.4.5', revision: 'f4260441345d31500d1587ee0abfdfcd20e3a66a', time: '2017-12-18 09:30:31'
    System info: host: 'Admin-Pc', ip: '172.20.29.134', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
    Driver info: driver.version: EventFiringWebDriver
          at com.workfusion.desktop.driver.ocr.impl.OcrResponseErrorHandler.toException(OcrResponseErrorHandler.java:40)
          at com.workfusion.desktop.driver.ocr.impl.OcrResponseErrorHandler.handleError(OcrResponseErrorHandler.java:31)
          at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:667)
          at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:620)
          at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:580)
          at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407)
          at com.workfusion.desktop.driver.ocr.impl.OcrClient.processImage(OcrClient.java:140)
          at com.workfusion.desktop.driver.ocr.Ocr.proccessImage(Ocr.java:49)
          at com.workfusion.desktop.driver.ocr.Ocr$proccessImage$0.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
          at Script1.run(Script1.groovy:8)
          at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
          at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
          at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
          at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:218)
          at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:187)
          at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:139)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:81)
          at com.sun.proxy.$Proxy3.executeScript(Unknown Source)
          at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:202)
          at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)

Hi Janus,
Do you run the process in recorder or control tower?
Are you sure the OCR is running at this time in the tray menu?

Please send us the logs from C:\RPAExpress\OCR\logs

Thank you.

ocr-task.log (31.7 KB)
ocr-rest-error.log (79.8 KB)
ocr-rest.log (114.5 KB)

I run them from rpa express and yes OCR is running.

Try restarting RPA Express and your computer.

@januscxakpyOht did restart help resolve the issue or do you still get the error?

it seems to help but I ran into another problem where is didnt want to read the rpa file so I stopped trying.

I’ve faced a similar problem: OCR running but it still keeps giving an error message every time I ask to read an OCR file. I’ve restarted my machine but it didn’t solve.

@fernando_sanmm
Which error do you get? Please post the error details here, we’ll have a look.

Sure. Here it is:

> Error executing OcrAction
  com.workfusion.studio.rpa.recorder.model.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=4,name=Optional[OcrAction],parent=-2,arguments=ActionArguments[varName=[nome],imageName=[C:\\Users\\fernando.paixao\\workfusion-workspace\\rpae_project\\recording-1517950884957\\1520883694950-anchor-1520890155068.apng],fullImageName=[1520883694950.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],offsetX=[-283],varType=[java.lang.String],offsetY=[80],delay=[0],width=[537],actionDetails=[(to 'nome' rectangle -283 x 80)],height=[148],awaitTimeout=[5000]]]
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:55)
      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)
  Caused by: org.openqa.selenium.WebDriverException: Image does not found : 1520883694950-anchor-1520890155068.apng
Command duration or timeout: 55.75 seconds
Build info: version: '8.4.4', revision: 'e73f2bf5fc565c545ea6913c92cce4c1a2b8f871', time: '2017-12-04 13:17:22'
System info: host: 'NO00017', ip: '169.254.49.186', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{imageSimilarityThreshold=0.8, webdriver.remote.sessionid=d8fbf4de-3b6c-401e-9e37-83797d36003f, CLOSE_ALL_WINDOWS=false, browserName=universal, takesScreenshot=true, javascriptEnabled=true, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: d8fbf4de-3b6c-401e-9e37-83797d36003f
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
      at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
      at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:720)
      at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:768)
      at com.workfusion.rpa.helpers.ImageElement.findImageRectangle(ImageElement.java:181)
      at com.workfusion.rpa.helpers.ImageElement.getRect(ImageElement.java:85)
      at com.workfusion.rpa.helpers.UiElement.getRect(UiElement.java:1012)
      at org.openqa.selenium.WebElement$getRect.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at Script4.run(Script4.groovy:1)
      at com.workfusion.studio.rpa.recorder.model.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:67)
      at com.workfusion.studio.rpa.recorder.model.playback.player.PlaybackContext.executeScript(PlaybackContext.java:70)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:32)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:55)
      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)
  Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
Build info: version: '8.4.4', revision: 'e73f2bf5fc565c545ea6913c92cce4c1a2b8f871', time: '2017-12-04 13:17:22'
System info: host: 'NO00017', ip: '169.254.49.186', 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.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:138)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
      at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
      at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:720)
      at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:768)
      at com.workfusion.rpa.helpers.ImageElement.findImageRectangle(ImageElement.java:181)
      at com.workfusion.rpa.helpers.ImageElement.getRect(ImageElement.java:85)
      at com.workfusion.rpa.helpers.UiElement.getRect(UiElement.java:1012)
      at org.openqa.selenium.WebElement$getRect.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at Script4.run(Script4.groovy:1)
      at com.workfusion.studio.rpa.recorder.model.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:67)
      at com.workfusion.studio.rpa.recorder.model.playback.player.PlaybackContext.executeScript(PlaybackContext.java:70)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:32)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:55)
      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)
  Caused by: java.util.NoSuchElementException: Image does not found : 1520883694950-anchor-1520890155068.apng
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at 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.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
      at Script1$1.call(Script1.groovy:12)
      at Script1$1.call(Script1.groovy)
      at com.workfusion.common.utils.SynchUtils.withFocusLock(SynchUtils.java:47)
      at com.workfusion.common.utils.SynchUtils$withFocusLock.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
      at Script1.run(Script1.groovy:5)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
      at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:218)
      at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:187)
      at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:139)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:81)
      at com.sun.proxy.$Proxy3.executeScript(Unknown Source)
      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:202)
      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

@fernando_sanmm According to the log, the bot cannot find the image when OCR action is performed. Are you sure the image is visible on screen at this point?

1 Like

Hello,
when working with OCR, I receive the following error:
“Error executing OcrAction”

Error executing OcrAction
  com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=6,name=Optional[OcrAction],parent=2,nextSibling=7,arguments=ActionArguments[varName=[texttocopy],imageName=[C:\\Users\\msouleillet\\workfusion-workspace\\rpae_project\\A6\\1523266512320-anchor-1523266512339.apng],fullImageName=[1523266512320.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],offsetX=[35],offsetY=[-2],delay=[0],width=[147],actionDetails=[(to 'texttocopy' rectangle 35 x -2)],height=[21],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:30)
      at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
      at com.workfusion.studio.rpa.recorder.playback.player.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)
  Caused by: org.openqa.selenium.WebDriverException: Failed to execute script. 500 Internal Server Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><message>Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [C:\Users\msouleillet\AppData\Local\Temp\tomcat.5849828487487889894.15580\work\Tomcat\localhost\ROOT] is not valid</message></error>
Build info: version: '8.5.1', revision: '87eae3e04f', time: '2018-03-14T11:03:21.319Z'
System info: host: 'P38-DELL-AUX', ip: '192.168.100.100', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: UniversalDriver
Command duration or timeout: 0 milliseconds
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
      at 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)
      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:656)
      at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592)
      at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:826)
      at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:892)
      at com.workfusion.rpa.helpers.Ocr.proccessImage(Ocr.java:111)
      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 Script6.run(Script6.groovy:6)
      at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
      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:35)
      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:30)
      at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
      at com.workfusion.studio.rpa.recorder.playback.player.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)
  Caused by: org.openqa.selenium.WebDriverException: Failed to execute script. 500 Internal Server Error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><message>Could not parse multipart servlet request; nested exception is java.io.IOException: The temporary upload location [C:\Users\msouleillet\AppData\Local\Temp\tomcat.5849828487487889894.15580\work\Tomcat\localhost\ROOT] is not valid</message></error>
Build info: version: '8.5.1', revision: '87eae3e04f', time: '2018-03-14T11:03:21.319Z'
System info: host: 'P38-DELL-AUX', ip: '192.168.100.100', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: UniversalDriver
Build info: version: '8.5.1', revision: '87eae3e04f', time: '2018-03-14T11:03:21.319Z'
System info: host: 'P38-DELL-AUX', ip: '192.168.100.100', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: UniversalDriver
      at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:189)
      at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:149)
      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
      at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
      at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:133)
      at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:202)
      at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98)
      at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:231)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

I use WorkFusion RPA Express Version 1.4.0
I have the OCR license (SWAO-1121-0006-4414-0216-9385.ABBYY.locallicense)

Thank you for your help.
Best regards

Max

Max, restart RPA Express and your computer. It should solve this issue.

Dear ashapkina

I just did it again, same error message as follow:

Error executing OcrAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=OcrAction.ftl,id=6,name=Optional[OcrAction],parent=2,nextSibling=7,arguments=ActionArguments[varName=[texttocopy],imageName=[C:\Users\msouleillet\workfusion-workspace\rpae_project\A6\1523266512320-anchor-1523266512339.apng],fullImageName=[1523266512320.png],xsi:type=[recorder:OcrAction, recorder:OcrAction],pollingInterval=[300],active=[true],offsetX=[35],offsetY=[-2],delay=[0],width=[147],actionDetails=[(to ‘texttocopy’ rectangle 35 x -2)],height=[21],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:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.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)
Caused by: org.openqa.selenium.WebDriverException: Image does not found : 1523266512320-anchor-1523266512339.apng
Command duration or timeout: 0 milliseconds
Build info: version: ‘8.5.1’, revision: ‘87eae3e04f’, time: '2018-03-14T11:03:21.319Z’
System info: host: ‘P38-DELL-AUX’, ip: ‘192.168.100.100’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: '1.8.0_121’
Driver info: 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 Recorder”}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: 123352d6-fc91-4370-99e3-5b164d6bf771
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at 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)
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:656)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:592)
at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:826)
at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:892)
at com.workfusion.rpa.helpers.ImageElement.findImageRectangle(ImageElement.java:183)
at com.workfusion.rpa.helpers.ImageElement.getRect(ImageElement.java:86)
at com.workfusion.rpa.helpers.UiElement.getRect(UiElement.java:1013)
at org.openqa.selenium.WebElement$getRect.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at Script6.run(Script6.groovy:5)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:90)
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:35)
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:30)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:17)
at com.workfusion.studio.rpa.recorder.playback.player.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)
Caused by: java.util.NoSuchElementException: Image does not found : 1523266512320-anchor-1523266512339.apng
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 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)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at Script1$1.call(Script1.groovy:12)
at Script1$1.call(Script1.groovy)
at com.workfusion.common.utils.SynchUtils.withFocusLock(SynchUtils.java:47)
at com.workfusion.common.utils.SynchUtils$withFocusLock.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 org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at Script1.run(Script1.groovy:5)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
at com.workfusion.autoit.driver.AutoItDriver.executeGroovyScript(AutoItDriver.java:243)
at com.workfusion.autoit.driver.AutoItDriver.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)
at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:133)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:202)
at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:231)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Any suggestion?

Thank you

Are you sure the image OCR uses is visible on the screen at the time of execution and is not blocked by other objects?
Could you also post a screenshot of the action to see the anchor area and OCR area you are using.


The aim is to get names in a column. Thus my anchor is “Dear” then my OCR “name”. I performed the same operations from the same PDF files…
Thank you

Check that the size of the image is the same as the image used as a sample.
If everything is correct, but yo still get an error, please post your recording here - we’ll have a look.

Dear ashapkina,

I managed the issue. It was the original PDF document which was to small. I zoomed it (140%). Therefore, the OCR got a clearest picture…
Nervertheless, it seems that the OCR function has some limits such as the below:

The above excel file is my Assignment 11 results.
Information in green are information well extracted by the OCR and the red onces are information not well performed.

Do you have any suggestion to fix that issue, knowing that the OCR functionality is one of the most valuable RPA asset when extracting information from a bunch of PDF documents for instance?

Thank you for your time and support

Max

There is currently no option to customize OCR or change its accuracy in RPA Express , but we’ll work to improve its quality in future releases.

1 Like