error: "DataPath does not exist"

Hi

I'm currently using the SimpleOCR extension in my application to recognize the text from an invoice photo. 

I'm now experiencing the following error: "DataPath does not exist" and this error always occurs when I call the ExtractTextFromMemImage action.

I don't understand why this is happening because it already worked correctly in another eSpace.  


Thank you

Solution

Hi Ana,


Maybe your problem must be related to the DataPath argument you are sending to the ExtractTextFromMemImage action.

To work properly, you have to send the Path_GetApplicationDirectory.ApplicationDirectory (from the Path_GetApplicationDirectory server action you call before) plus "\bin2\hidden_resources\YoureSpaceName".

One more thing, you should check in your Resources folder of your current eSpace if you have the following files: eng.traineddata and jpn.traineddata. You need this because the ExtractTextFromMemImage action is expecting 2 types of languages: english or japanese.


I hope this can solve your problem :)

Solution

Tiago Pestana wrote:

Hi Ana,


Maybe your problem must be related to the DataPath argument you are sending to the ExtractTextFromMemImage action.

To work properly, you have to send the Path_GetApplicationDirectory.ApplicationDirectory (from the Path_GetApplicationDirectory server action you call before) plus "\bin2\hidden_resources\YoureSpaceName".

One more thing, you should check in your Resources folder of your current eSpace if you have the following files: eng.traineddata and jpn.traineddata. You need this because the ExtractTextFromMemImage action is expecting 2 types of languages: english or japanese.


I hope this can solve your problem :)

Hi. Thanks for your response. I am getting same error. I am using Outsystems 11.6.27 for Mobile


May I ask what does eSpace or  "YoureSpaceName" mean? 


I checked the default value of the variable of the SimpleOCR_Sample_Mobile module 

 it is 

SyntaxEditor Code Snippet

Path_GetApplicationDirectory.ApplicationDirectory + "\bin2\hidden_resources\SimpleOCR_Sample_Mobile"

so I tried changing it to my module name but still getting same error. I also tried both following values as per the instructions in https://www.outsystems.com/forge/component-overview/3086/simple-ocr

Path_GetApplicationDirectory.ApplicationDirectory + "\bin2\hidden_resources"

and 

SyntaxEditor Code Snippet

Path_GetApplicationDirectory.ApplicationDirectory + "\tessdata"


in addition to adding  "\my module name"  after \bin2\hidden_resources but still getting same error.

Your help is much appreciated. 

I tried also using the function GetEntryEspaceName() as per the link https://www.outsystems.com/forums/discussion/26517/how-to-get-the-the-apps-name-in-runtime/ it returns the eSpace name which is the module name. But still getting the error.