Machine Learning Extractor usage issue

I’m trying to use the machine learning extractor activity and i getting the attached error.

Below is the error :
RemoteException wrapping UiPath.MachineLearningExtractor.Activities.Exceptions.MLRequestException: Invalid server response. —> RemoteException wrapping System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (BAD REQUEST).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at UiPath.MachineLearningExtractor.Activities.Services.MLRequester.d__4.MoveNext()
— End of inner exception stack trace —
at UiPath.MachineLearningExtractor.Activities.DataExtraction.MachineLearningExtractor.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Also, I have a query reagrding how to configure the Server Endpoint in this activity.

Take a look at this :slight_smile:

@TimK Thanks for your help. I’m able to progress on that. Just have one more query, can you tell me how does this activity function and how can we extract values from pdf using this extractor?

Hi,

I am assuming you have seen this post?

This gives you a good oversight of the activity and includes a demo.

It works by using the IntelligentOCR built by UiPath to access the document and retrieve key words you have identified. It the learns based of of more documentation you put through it through the validation station.

Hi @TimK,

I have gone through the link and was following this link for doing this document. But I’m not able to understand how we check the extracted output and how the values are getting extracted and where they are getting stored.

Data Extraction Scope: Request is unauthorized. Please make sure that a correct API Key was provided…please help!!!

@Ioana_Gligan @loginerror
Hi

Hope you are doing well

How to create API key for Machine learning extractor using on premise orchestrator account.

Error -
Data Extraction Scope: Request is unauthorized. Please make sure that a correct API Key was provided.

exception - RemoteException wrapping UiPath.DocumentUnderstanding.ML.Activities.Exceptions.MLRequestException: Request is unauthorized. Please make sure that a correct API Key was provided. —> RemoteException wrapping System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (UNAUTHORIZED).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at UiPath.DocumentUnderstanding.ML.Activities.Services.MLClient.d__6`1.MoveNext()
— End of inner exception stack trace —
at UiPath.DocumentUnderstanding.ML.Activities.MachineLearningExtractor.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Best Regards,
Naveen Chaganti

1 Like

Whenever i checked a invoice taxonomy data inside configure extractor…ML extractor shows unauthorized AP key…Please help…

1 Like

Hello @Naveen.Ch

You will need to create an account on platform.uipath.com and get your ApiKey for DocumentUnderstanding from there.

1 Like

Hi @Ioana_Gligan

Is there any document for to create ApiKey for machine learning extractor.

Kindly provide the steps to create api key for ML extractor …it would be great help.

Best Regards,
Naveen Chaganti

Sure!

Go to platform.uipath.com and access your account. Then go to the Licenses tab from the left hand menu, look under the Document Understanding entry, and you should have an ApiKey auto-generated in there. You can copy it from the Copy button and paste it between quotes in the activity directly.

Ioana

1 Like

Hi, API will work but there is a exception -

Whenever i checked a invoice taxonomy data inside configure extractor…ML extractor shows unauthorized AP key…Please help

1 Like

Hi, I have the same issue. Did you already solved this, and if yes, how? I face the same problems. My Studio is connected to the UiPath Cloud Plattform, and when I use these API-key for Document Understanding I receive the same error.

best regards,
Robert

hello all,

Please make sure your Endpoint is https://invoices.uipath.com and that you are using a Community account ApiKey. if you have an Enterprise account, please use your key and use the endpoint https://invoices.uipath.com/?edition=enterprise . This might solve your issue.

Hope this helps,

Ioana

4 Likes

@Robert_Heggio I faced the same issue although it was working before. However, Ioana’s advice did the trick. Thank you!!

1 Like

Can we use any other endpoints instead of these three:

I am working on data extraction from pdf which is not related to any of three and am using community version of uipath studio .

Please let me know.

Thanks

Hi Team,

any one facing this issue.
after using action triggers, bot forget value of local variable

i am looping through the directory.getfiles in for each

after first iteration, when i resume the process
in next iteration, it says object reference not set instance of object

P.S : there are 4 files in that directory.

3 files are still left

in for each loop,
i have Digitize document,
then write line
then classifying my doc
Present Classification Station
Train Classifiers Scope
Data Extraction Scope
Create Document Validation Action
Wait For Document Validation Action And Resume
then export result

all these activity works fine in first iteration, but in next iteration bot forget the files

execution is good till action comes from orchestrator

now the action is completed form orchestrator

now i will resume my workflow

here i am also checkking the count of files present in rhat directory again
result = 4 means it identifiles there are total 4 files

it complete the first iteraction and exports the result for that document
now it again goes back to main for each loop where it have to take next document but it forget the value and gives this error

please suggest ASAP so that i can overcome the issue.

thanks & regards

gpal

Hello @programmer,

(Love your nickname :slight_smile: )

If you have a use case that is not in the list of our pre-trained available models, consider building your own :smiley:

Use AIFabric and the DU ML packages to define and train your own model based on your needs.

Pls reach out to your UiPath contact to see how to get access + access to DataManager for document tagging (tagging documents to have the data on which the model can be trained).

Ioana

@gpal

Please check you are not overwriting your variables - if the exception appears for the file path, check you are not using the same variable to capture something else in your for each.

Also pls note you should be using a parallel for each instead of a for each if you don’t want your process to run sequentially and stop and wait after each single document. Do ensure that all variables specific to one file are only within the scope of the parallel for each / for each loop…

I also strongly suggest you activate the Log Activities button in your Studio (Debug tab) to see which activity it reaches, where it crashes), and using the debug file feature, to see the state of your variables when the exception occurs . This would make your life easier :slight_smile:

Ioana

1 Like

@programmer
Hey Could you please tell me where you found these list of end-points?