Tesseract OCR or Microsoft OCR error

Hi All,

Tesseract OCR or Microsoft OCR: Object reference not to set to an instance of an object. For two OCR I’m getting same error please suggest me.

Thanks in advance
Niranjan

Hi @Niranjan_k

Can you share the screenshot of the activity where you are getting error

Regards

@vrdabberu please find the below error image

HI @Niranjan_k

Please check the whether the Input, API Key and End Point were correctly assigned or not?

Regards

1 Like

Hi,

In my environment. it works as the following. Did you set same image type variable at Image property of LoadImage activity and Image property of TesseractOCR activity?
Or to isolate cause, can you try the following sample?

Sample
Sample20240121-2aL.zip (10.3 KB)

Regards,

@Yoichi i have tried to implement the same logic to read multiple images from the folder.but got some errors please suggest me



  1. Make sure that in H:\UiPath\Save Data From PDF\Output exists image files in the root folder, not in another subfolder(s).

  2. Make sure that your robot have Full control (or Read/Write/Execute) in H:\UiPath\Save Data From PDF\Output folder

  3. Try to upgrade UiPath.UIAutomation.Activities package to the latest version

  4. Try to add this value Directory.GetFiles("H:\UiPath\Save Data From PDF\Output") for FilePath variable of type System.String[]

  5. Try to add the Message Box with text strData under the Tesseract OCR activity, not outside the scope.

  6. If you cannot figure it out the cause, use breakpoints and debug the process to see at which step you have a null value for your image file paths (FilePath).

1 Like

Hi,

Which file type do you need to extract text from?
If you want to get text from PDF file, can you try Read PDF with OCR?

image

Or if you need to get text from image file such as jpeg, give it try to use search pattern for it.

image

Regards,

@Yoichi
@vrdabberu
@marian.platonov thanks everyone my bad in output folder have both png and excel files now I have filtered it is working

1 Like

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