Get OCR Text Invalid API Key Error

Just started using the 2021.4 version, and whenever I try to use “Get OCR Text,” an error message says “invalid API key specified UiPathOCRInvaildAPIKey.” This doesn’t happen when I run the same sequence in the 2019 version I was previously using. Details from error below.

RemoteException wrapping System.Exception: Error performing OCR: Invalid API key specified UiPathOCRInvalidApiKey —> RemoteException wrapping System.ServiceModel.FaultException: Invalid API key specified UiPathOCRInvalidApiKey
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object outs, IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.<>c__DisplayClass7_01.<CreateGenericTask>b__0(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task`1 promise, Boolean requiresSynchronization)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Vision.VisionClient.d__5.MoveNext()
— End of inner exception stack trace —
at UiPath.Core.Activities.GetOCRText.OnScrapeFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

The default OCR engine in 21.4 is UiPath Cloud OCR engine, which requires an API Key. It was previously Tesseract, which does not require a key. One easy way to “fix” this is to change the default OCR engine in project settings.


OR fill in the API key in project settings:

All community users also have access to UiPath OCR for free — they just need to grab their OCR key from their licensing section (CV in this case)

response thanks to @Ion_Miron and Tony Tzeng!

5 Likes

I have changed it but still error

All community users also have access to UiPath OCR for free — they just need to grab their OCR key from their licensing section (CV in this case)

Is this referring to the API Key listed in the “Automation Cloud” (Admin - Licenses - Robots & Services)? Or is there another API key that is supposed to be utilized for CV/UiPath OCR activities? I’m testing UiPath with the Studio Community edition and I updated the project settings to include the API key from the above destination and it the system is still returning an invalid API key error.

Hi, any progress on that? I got a similar problem. Thanks

Hey ji.had!

Most likely you are still using UiPath OCR. Whick engine is mentioned in a “Get OCR text” activity?
image

If you want to switch to Tesseract- perform actions that @magizoologist mentioned, then delete “Get OCR text” activity and add it to again to work flow again. it will be Tesseract.

1 Like