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!

2 Likes

I have changed it but still error