Problem with Local OCR in Virtual Box

Hello i’m trying to use local OCR in an Virtual machine which is windows 10.
I activated avx2 instruction set.
The same workflow runs fine in my local pc
But when I try to execute UiPath document OCR with flag local on my virtual machine I get the following Error:

Info Input language:auto, translated language:auto

16:09:13.5109 Error Failed to load assembly: du_ocr_wrapper, Version=1.0.8496.18540, Culture=neutral, PublicKeyToken=null.
16:09:17.5439 Error Error running OCR
16:09:17.5659 Fatal

I tried to reinstall UiPath studio and reinstall also all dependencies.

Other OCR engines like Tesseract are working fine

Is there anybody who can help?

@Julian3

Please download the required pckage

https://docs.uipath.com/activities/other/latest/user-guide/ui-path-document-ocr

Cheers

Hi i already installed the right package and it is runnimg correctly on my local machine, but not in the vm

@Julian3

Lloks like on the vm it is unable to download the packages…copy the packages fromyour local to vma nd check if it works

Packages will be in %userprofile%\.nuget\packages

Cheers

I already copied my whole nuget file from my local machine where it works to the vm but still faces the same error

When i look in my packages the du_ocr_wrapper file is available

@Julian3

When you performed reinstallation did you happen to uninstall everything and remove alld ependencies of UiPath and reinstalled?

Cheers

Yes i deleted UiPath and deleted all packages in .nuget

@Julian3

Can you open the exception details from locals page and check the detailed exception that might give more info

Cheers

sure this is the full error

RemoteException wrapping System.AggregateException: One or more errors occurred. (Request CorrelationId: f07e5922-a4fb-4c86-8ca6-6a26cc071ea9
Request PredictionId: CC5GpUhe0JfydKUeBvpr1138XCDrxDcfet9GSWV0LCo=_45fac9a3-cae0-42dd-8f23-f8ff617b2f39
Error performing OCR: Die Datei oder Assembly “du_ocr_wrapper,
Version=1.0.8496.18540,
Culture=neutral,
PublicKeyToken=null” oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. UiPathOCRErrorRunningEngine) —> RemoteException wrapping UiPath.Shared.Activities.TrackingException: Request CorrelationId: f07e5922-a4fb-4c86-8ca6-6a26cc071ea9
Request PredictionId: CC5GpUhe0JfydKUeBvpr1138XCDrxDcfet9GSWV0LCo=_45fac9a3-cae0-42dd-8f23-f8ff617b2f39
Error performing OCR: Die Datei oder Assembly “du_ocr_wrapper,
Version=1.0.8496.18540,
Culture=neutral,
PublicKeyToken=null” oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. UiPathOCRErrorRunningEngine —> RemoteException wrapping System.Exception: Error performing OCR: Die Datei oder Assembly “du_ocr_wrapper,
Version=1.0.8496.18540,
Culture=neutral,
PublicKeyToken=null” oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. UiPathOCRErrorRunningEngine —> RemoteException wrapping UiPath.Vision.OCR.OCRException: Die Datei oder Assembly “du_ocr_wrapper,
Version=1.0.8496.18540,
Culture=neutral,
PublicKeyToken=null” oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. UiPathOCRErrorRunningEngine —> RemoteException wrapping System.IO.FileNotFoundException: Die Datei oder Assembly “du_ocr_wrapper,
Version=1.0.8496.18540,
Culture=neutral,
PublicKeyToken=null” oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
bei UiPath.DocumentUnderstanding.OCR.LocalServer.DocumentOcrExternalLsEngine.RunOcr(Bitmap image,
Int32 numberOfThreads)
bei UiPath.OCR.Core.LSDocumentOCREngine.RecognizeAsync(CancellationToken ct)
bei UiPath.Vision.OCR.Engine.BaseEngine.d__20.MoveNext()
— End of inner exception stack trace —
bei UiPath.Vision.OCR.Engine.BaseEngine.d__20.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.Vision.Core.OcrEngineRunner.d__0.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.Vision.Host.Service.HostServiceWithRefContext.d__5.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.CoreIpc.Server.d__22.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.CoreIpc.Server.d__21.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.CoreIpc.Server.<>c__DisplayClass4_2.<<-ctor>b__6>d.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.CoreIpc.IOHelpers.d__13.MoveNext()
— Ende der Stapelüberwachung vom vorhergehenden Ort,
an dem die Ausnahme ausgelöst wurde —
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei UiPath.CoreIpc.IOHelpers.d__191.MoveNext() --- End of inner exception stack trace --- at UiPath.Vision.VisionClient.ScrapeAsync(OCRInput input, CancellationToken ct) at UiPath.OCR.Core.Core.OCRScraper.ScrapeOCRAsync(Image image, OCROptions options, CancellationToken cancellationToken) at UiPath.OCR.Activities.UiImage.ScrapeOCRAsync(OCROptions options, CancellationToken cancellationToken) at UiPath.OCR.Activities.OCRBase.ScrapeWithOptionsAsync(Image image, OCROptions ocrOptions, CancellationToken ct) at UiPath.OCR.Activities.UiPathDocumentOCR.ScrapeWithOptionsAsync(Image image, OCROptions ocrOptions, CancellationToken ct) at UiPath.OCR.Activities.OCRBase.PerformOCRAsync(Image image, Dictionary2 options,
CancellationToken ct)
— End of inner exception stack trace —
at UiPath.OCR.Contracts.Activities.OCRAsyncCodeActivity.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 —
at UiPath.IntelligentOCR.Digitization.ExtendedOcrEngineActivityWrapper.RunOcr(Bitmap bitmap,
CancellationToken token)
at UiPath.IntelligentOCR.Digitization.ExtendedOcrEngineActivityWrapper.Execute(PageRendererResults renderedPage,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.RunOcr(IOcrEngine ocrEngine,
PageRendererResults renderedPage,
String documentId,
CancellationToken token)
— End of inner exception stack trace —
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.ApplyOcr(CachingPageRenderer renderer,
IOcrEngine ocrEngine,
DigitizationSettings settings,
String contentId,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.ProcessPageWithOcr(Content page,
IOcrEngine ocrEngine,
DigitizationSettings settings,
String contentId,
CachingPageRenderer renderer,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.ProcessPdfPageWithAuto(Content page,
IOcrEngine ocrEngine,
DigitizationSettings settings,
String contentId,
CachingPageRenderer renderer,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.GetRawPage(Content page,
IOcrEngine ocrEngine,
Boolean shouldApplyOcr,
DigitizationSettings settings,
String contentId,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.PageDigitizer.ProcessPage(IDigitizationDocument digitizationDocument,
Int32 pageNumber,
IOcrEngine ocrEngine,
Boolean shouldApplyOcr,
DigitizationSettings settings,
String contentId,
CancellationTokenSource source)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.DocumentDigitizer.GetPages(Content content,
DigitizationSettings settings,
IOcrEngine ocrEngine,
CancellationToken token)
at UiPath.DocumentUnderstanding.Digitizer.Digitization.DocumentDigitizer.Digitize(Content content,
DigitizationSettings settings,
IOcrEngine ocrEngine,
CancellationToken token)
at UiPath.IntelligentOCR.Digitization.IntelligentOcrDigitizer.Digitize(Content content,
IOcrEngine ocrEngine,
ApplyOcrOnPdf applyOcrOnPdf,
Boolean detectCheckboxes,
IDigitizationScheduler scheduler,
IDigitizerTelemetryService telemetryService,
CancellationToken token)
at UiPath.IntelligentOCR.Activities.Digitization.DigitizeDocument.ExecuteAsync(NativeActivityContext context,
CancellationToken cancellationToken)
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)

@Julian3

Can you please confirm the below and then try

Cheers

1 Like

Yeah i double checked that avx2 is enabled in vm.
I deactivated and activated it but still got the same error

I found the error.
You were right it was due to avx2

It was activated but was not working.
I checked it with the tool HWinfo.

To work properly i first had to disable hyper-v on my host-machine.

Now it works.
Many Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.