Why does OCRExtract when using XModule Local OCR throw an error but online mode works fine?

If I use OCRExtract OR OCRExtractRelative with XModule Local OCR enable and don’t allow online OCR, I get the following error:

The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type boolean

If I use Engine 1 and allow online OCR, it works fine and displays the relevant text.

What is the issue?

The code example is very simple, just standard OCRExtract:

    {
      "Command": "OCRExtract",
      "Target": "ocrextract_dpi_192.png",
      "Value": "Code1",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${Code1}",
      "Value": "",
      "Description": ""
    },

Does this happen for every image or just a specific image? Can you post a test image here?

Hello, we found that this error happens if the latest XModule version is not installed. You need at least V2022a for local OCR support.

Unfortunately the OCR XModule box “installed” status is not reliable. It shows “installed” even if the latest version is not installed. It actually displays the XFile XModule version number (v1.0.12) . So this indicator is not reliable for local OCR (of course, we will fix this with a future update).

But the workaround is easy: Just download & install the lastest XModule version from our homepage.

image

Every image, I didn’t bother posting example image or macro because it happens everywhere

Thanks! Unfortunately in this case this solution doesn’t work for me - I have the latest xmodule version installed and it still doesn’t work. I just tried reinstalling from your link as well. Still having the same issue

any idea? @ulrich @admin

@admin Update see below:

I am using macOS Monterey 12.0.1 and UI Vision 8.2.5 in Chrome
Contents of ocrlang.json are as follows:
[“eng”,“fre”,“ita”,“ger”,“spa”,“por”,“chs”,“cht”]

I have also tried reinstalling XModule to the latest version and it shows 1.5.15 as being installed and LOCAL OCR Processing shows 1.0.12

When I try to run the demo: DemoPDFTest_with_OCR I get the following error:

  • [error] Line 14: Please enable OCR first

Just to clarify: Online OCR works but local OCR gives you an error?

@admin thanks for the reply. Yes, that is correct. Online OCR works but local gives me an error. When I go into the OCR settings and set Default OCR Engine to XModule Local OCR I am unable to do any OCR.

I get the following error:

  • [error] Line 2: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type boolean

However if I select Engine 1 and check Allow Online OCR, then the OCR works fine.

So local OCR does not work for me at all but online does.

This error has been reported to us by a few users (Mac/Windows). Unfortunately we have not been able to recreate on our test systems yet. But we are working on it. Any hint on when it happens/when it not happens would be helpful.

I have three separate computers on macOS and all throw the same error every single time for any local OCR attempt.

Anything I can do to show you this error? It is literally any local OCR doesn’t work at all.

I have enabled/allowed all the requests in system preferences/privacy and on latest version of chrome/UI vision

In other words local OCR has never worked for me since I first installed UI vision

A user found the culprit: The First argument must be one of type string,... error happens if the XModule root directory is changed from the default one:

"I have done some investigating about this issue, and it seems that the local OCR works fine if you install RPA extension and Xmodules to the default folder and also keep the default Home folder in the FileAccess XModule settings:
… \Desktop\uivision

If you change that, then it seems that the local OCR will not work any longer (at least in our case). If I change it back to that, then it works fine. Are you aware of this and will this be fixed in the upcoming versions?"

=> We confirmed this, and will fix it with the next update. Meanwhile, as workaround, please keep the default XModule home folder.

@admin Thank you for looking into this. Unfortunately for me this is not the solution as XModules is already set to the default home folder. I double checked this and the folder is \Desktop\uivision and I didn’t change anything upon Xmodules installation.

Any other suggestions?

Oh, strange… can you try on a second machine? Do you see the same issue there as well?

@admin Yes, as mentioned earlier in my post, I have three separate computers on macOS and all throw the same error every single time for any local OCR attempt. I literally do a standard XModules and UI Vision install without changing anything, and on each computer I have the same problem. They are on different versions of MacOS too, but they all have the same problem.

1 Like

Hi just wanted to chime in here.

Also hitting this on 2 freshly restored Macs using default install location (~/Desktop/uivision).

Occurs with Local XModule OCR.
Doesn’t occur with Online OCR.

Glad I found this thread so I know I’m not the only one seeing this. Hope we can get it resolved. Thanks!

I have this exact same problem. I am also on MacOS. Seems a lot of users have this problem? UI Vision is completely unusable for me because my company policy only allows local connections not external OCR.

Unfortunately this bug has rendered the entire extension useless for me. Back to iMacros for now.
@admin any update on this?

Thank you!

Hello, the issue has been fixed internally. An update should be available very soon.

Thanks, good to hear. @admin Did you find the issue? Since for me it was not changing the default storage location that was the problem.

Oh. => Please try with the new V8.2.7 (released today). Does this version work for you? (If not, there might be another Mac issue that we need to debug, please let us know).