Document understanding is not working. throw error

We’d document understanding license in orchestrator. And tried to use digitize-document activity with uipath-document-ocr. But it always errored. Studio version: 2021.10.4 enterprise. Any input is much appreciated.

The error message as follows


RemoteException wrapping System.Exception: An unexpected error has occurred  ---> RemoteException wrapping System.AggregateException: One or more errors occurred.  ---> RemoteException wrapping System.AggregateException: One or more errors occurred.  ---> RemoteException wrapping UiPath.SmartData.Digitization.Tokenization.TokenizationException: MergedDocuments.pdf_Page_0  ---> RemoteException wrapping System.Exception: Error performing OCR: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. UiPathOCRErrorRunningEngine  ---> RemoteException wrapping UiPath.Vision.OCR.OCRException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. UiPathOCRErrorRunningEngine  ---> RemoteException wrapping Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

   at Newtonsoft.Json.JsonTextReader.ParseValue()

   at Newtonsoft.Json.JsonTextReader.Read()

   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)

   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)

   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)

   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)

   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)

   at UiPath.OCR.Core.ImageAnnotatorService.<BatchAnnotateImagesAsync>d__8.MoveNext()

--- 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.OCR.Core.UiPathCloudOCRExternalEngine.<RecognizeAsync>d__0.MoveNext()

--- 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.OCR.Core.UiPathCloudOCREngine.<RecognizeAsync>d__6.MoveNext()

--- 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.OCR.Engine.BaseEngine.<RunAsync>d__20.MoveNext()

    --- End of inner exception stack trace ---

   at UiPath.Vision.OCR.Engine.BaseEngine.<RunAsync>d__20.MoveNext()

--- 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.Core.OcrEngineRunner.<ScrapeAsync>d__0.MoveNext()

--- 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.Host.Service.HostServiceWithRefContext.<ScrapeAsync>d__5.MoveNext()

--- 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.CoreIpc.Server.<InvokeMethod>d__22.MoveNext()

--- 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.CoreIpc.Server.<HandleRequest>d__21.MoveNext()

--- 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.CoreIpc.Server.<>c__DisplayClass4_2.<<-ctor>b__6>d.MoveNext()

--- 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.CoreIpc.IOHelpers.<WithResult>d__12.MoveNext()

--- 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.CoreIpc.IOHelpers.<WithTimeout>d__18`1.MoveNext()

    --- End of inner exception stack trace ---

   at UiPath.OCR.Activities.UiPathOCRBase.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

   at System.Activities.AsyncCodeActivity`1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)

   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

--- 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.IntelligentOCR.Digitization.ExtendedOcrEngineActivityWrapper.<Execute>d__2.MoveNext()

--- 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.SmartData.Digitization.OCR.OcrTokenizer.<TokenizeAsync>d__9.MoveNext()

    --- End of inner exception stack trace ---

   at UiPath.SmartData.Digitization.OCR.OcrTokenizer.<TokenizeAsync>d__9.MoveNext()

--- 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.SmartData.Digitization.PDF.PdfTokenizer.<TokenizePageImage>d__13.MoveNext()

--- 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.SmartData.Digitization.PDF.PdfTokenizer.<ProcessPageDocument>d__11.MoveNext()

    --- End of inner exception stack trace ---

   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)

   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)

   at System.Threading.Tasks.Task`1.get_Result()

   at UiPath.SmartData.Digitization.ContentTokenizer.<>c__DisplayClass8_0.<TokenizePage>b__0(Task`1 t)

   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()

   at System.Threading.Tasks.Task.Execute()

    --- End of inner exception stack trace ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.SmartData.Digitization.DocumentDigitizer.<DigitizeAsync>d__15.MoveNext()

--- 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.IntelligentOCR.Activities.Digitization.DigitizeDocument.<ExecuteAsync>d__35.MoveNext()

    --- End of inner exception stack trace ---

   at UiPath.Shared.Activities.AsyncTaskNativeImplementation.BookmarkResumptionCallback(NativeActivityContext context, Object value)

   at UiPath.Shared.Activities.AsyncTaskNativeActivity.BookmarkResumptionCallback(NativeActivityContext context, Bookmark bookmark, Object value)

   at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)

   at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)


@ranjith.kumar

It’s difficult to understand the issue just by sharing the exception message

Suggest to share the workflow screenshots and when you getting this error

For this debug your workflow by clicking step into

Thanks

@Srini84
It just contain only Digitize-Document activity like in image. I’m just testing the document understanding works.

Hi @ranjith.kumar ,

Can you please show the properties of the activity.

Thanks

Hi!

Have a view on this video

regards,
NaNi

It works fine in my local machine( with free version). But issue is in client machine( with enterprise version). I’m not sure what went wrong.

Here is the property images

image

Hi!

Have you updated the package in client machine?

Regards,
NaNi

@ranjith.kumar

Check below link for your reference

Hope this will help you

Thanks

Has anyone resolved this issue? I have been running the same automation for 6 months with no issue. As of today, Digitize Document stopped working with the error “Digitize Document: An unexpected error has occurred”

In checking the debug details, the following is stated:

RemoteException wrapping System.Exception: An unexpected error has occurred —> RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping System.EntryPointNotFoundException: Unable to find an entry point named ‘cveInputArrayFromVectorOfMat’ in DLL ‘cvextern’.
at Emgu.CV.Util.VectorOfMat.cveInputArrayFromVectorOfMat(IntPtr vec)
at Emgu.CV.Util.VectorOfMat.GetInputArray()
at Emgu.CV.CvInvoke.Merge(IInputArrayOfArrays mv,
IOutputArray dst)
at Emgu.CV.BitmapExtension.ToImage[TColor,TDepth](Bitmap bitmap)
at Emgu.CV.BitmapExtension.ToImage[TColor,TDepth](Bitmap bitmap)
at UiPath.SmartData.ImageProcessing.Blobs.BlobUtils.ExtractBlobsWithExtendedInfo(Bitmap bitmap,
Boolean isInvertedImage,
BlobExtractionSettings settings,
Boolean discardAnyInsidePoints)
at UiPath.SmartData.OCR.RectangleTableFinding.RectangleTableFinder.GetBlobs(Bitmap image,
Size pageSize)
at UiPath.SmartData.OCR.RectangleTableFinding.RectangleTableFinder.FindTables(OcrImage image)
at UiPath.SmartData.OCR.TableDetection.OcrTableDetector.<>c__DisplayClass6_0.b__0(ITableFinder f)
at UiPath.SmartData.Utils.ImmutableArrayExtensions.d__62.MoveNext() at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items) at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource](IEnumerable1 items)
at UiPath.SmartData.OCR.TableDetection.OcrTableDetector.FindTableAreas(OcrImage image,
ImmutableArray1 tableFinders) at UiPath.SmartData.OCR.TableDetection.OcrTableDetector.Detect(PageWithTokens page, String correlationId) at UiPath.SmartData.Digitization.OCR.OcrTableAnalyzer.Detect(PageWithTokens page, String correlationId) at UiPath.SmartData.Digitization.PDF.PdfTokenizer.<>c__DisplayClass14_0.<CreatePageWithTables>b__0() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— 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.SmartData.Digitization.PDF.PdfTokenizer.d__14.MoveNext()
— 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.SmartData.Digitization.PDF.PdfTokenizer.d__12.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at UiPath.SmartData.Digitization.ContentTokenizer.<>c__DisplayClass8_0.b__0(Task1 t) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— 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.SmartData.Digitization.DocumentDigitizer.<>c__DisplayClass17_0`1.<g__AttachContinuation|0>d.MoveNext()
— 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.SmartData.Digitization.DocumentDigitizer.d__15.MoveNext()
— 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.IntelligentOCR.Activities.Digitization.DigitizeDocument.d__35.MoveNext()
— End of inner exception stack trace —
at UiPath.Shared.Activities.AsyncTaskNativeImplementation.BookmarkResumptionCallback(NativeActivityContext context,
Object value)
at UiPath.Shared.Activities.AsyncTaskNativeActivity.BookmarkResumptionCallback(NativeActivityContext context,
Bookmark bookmark,
Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context,
Bookmark bookmark,
Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

I am at a complete loss why it has decided not to work anymore.

image

To add, the following actions have been taken to attempt to resolve the issue:

  • Rolled forward the DU packages
  • Attempted to use an older package of the automation
  • Uninstall and Re-Installed UiPath

The problem continues to exist.

Can you upgrade the UiPath.IntelligentOCR.activities to the latest version? Also please install UiPath.OCR.activities if you are using UiPath Document OCR and the others too to the latest packages if you are using Omnipage.

However, I see you’re using UiPath Document OCR but the package is not installed, instead there’s omnipage. Please check and try again.

After a call with UiPath support, it appears there was an error with a .dll that was creating this issue. They were quite baffled after we tried every possible fix to replace activities, updated all packages, and the error still persisted.

I ended up rolling the automation back to a previous version where it worked without error, and moved forward form there.

This was a great reminder to publish often to Dev to prevent a mass amount of rework. Lucky for me the rework was minimal in this instance.