Create your first automation in just a few minutes.Try Studio Web

Amazon Textract

Amazon Textract

by UiPath

1

Activity

Downloads

5.5k

Nick Sui
Posted 3 years ago

Hello, 

I am using version 3.0.0 and have some issues using "Analyze Multipage Document" activity. It always return me the following error. Does anyone has any solutions? Thanks!

Here's the error:

Analyze Multipage Document: Cannot find column 5.

RemoteException wrapping System.IndexOutOfRangeException: Cannot find column 5. 

   at System.Data.DataColumnCollection.get_Item(Int32 index)

   at UiPath.Amazon.Textract.Client.TextractReader.CreateDataRow(DataTable resultTable, IReadOnlyList`1 cellValues)

   at UiPath.Amazon.Textract.Client.TextractReader.AddRows(DataTable tblValues, DataTable tblScores, IEnumerator`1 blockEnumerator)

   at UiPath.Amazon.Textract.Client.TextractReader.CreateDataTables(IEnumerator`1 blockEnumerator)

   at UiPath.Amazon.Textract.Client.TextractReader.ReadBlocks(IEnumerable`1 blocks)

   at UiPath.Amazon.Textract.Client.TextractClient.d__29.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Activities.AnalyzeMultipageDocumentActivity.d__39.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at UiPath.Amazon.Textract.Activities.AsyncActivity.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)

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)

   at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)

   at UiPath.Core.Activities.ExecutorInvokeActivity.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)

Federico Franco
Posted 4 years ago

is it possible to get the raw text word and line text from the document instead of Key Value Pairs, and Table Data?

Rodrigo Pinto
Posted 4 years ago

Hey UiPAth Team,

Thanks for including the VPC Endpoint as an option. 

However, when I try to use only setting the VPC Endpoint it still asks me for the "Access Key Id" and the "Secret Key".

As this is internal VPC Connection is there any chance to make those not mandatory in case the VPC Endpoint is defined?

As clarification, our VPC admin does not allow us to create IAM users but only assign policys to instance.

Mike Morse
Posted 4 years ago ago

Hi Rodrigo,

I understand the surface level ask here but could you contact me directly so we could get a better idea of your configration and how you would like to authenticate to the Textract service through the VPC endpoint?  (mike.morse@uipath.com)

Lalitha Venkataraman
Posted 4 years ago

Hi Team,

I was wondering if we will have ability to change the API end point to private endpoint rather than pulblic end point

Amit Bhatt
Posted 4 years ago

Hi Team,

I am unable Uipath AWS Textract activity 2.1.0 and followed the steps given for IAM user and successfully generated client id and secret on AWS. It gives me following error. Can anyone help

Error

RemoteException wrapping UiPath.Amazon.Textract.Client.AwsException: Request has unsupported document format 

   at UiPath.Amazon.Textract.Client.TextractClient.d__13.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Client.TextractClient.d__12`1.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Client.TextractClient.d__14`1.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Client.TextractClient.d__23.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Activities.AnalyzeSinglePageDocumentActivity.d__35.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at UiPath.Amazon.Textract.Activities.AsyncActivity.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)

Mike Morse
Posted 4 years ago ago

What is the Activity you are using and what is the file extension?  The error shown typically thrown by Aws when you pass in a document with an unsupported extension.

Birinder Singh
Posted 5 years ago
  • Thanks. Yes I saw your response. The Request Syntax has the key named "FeatureTypes": [ "string" ], which can have value TABLE | FORMS  The caller needs to call it with either TABLE or FORMS or both
  • Let me know if I can have a quick update on the customer activity for just this AnalyzeDocument https://docs.aws.amazon.com/textract/latest/dg/API_AnalyzeDocument.html
Jagan Enugala
Posted 5 years ago

Getting the following error for some of the documents while using Analyze Multipage Document Activity.

RemoteException wrapping System.ArgumentException: Cannot change DataType of a column once it has data. 

   at System.Data.DataColumn.set_DataType(Type value)

   at UiPath.Amazon.Textract.Client.TextractReader.AddRows(DataTable tblValues,

DataTable tblScores,

IEnumerator`1 blockEnumerator)

   at UiPath.Amazon.Textract.Client.TextractReader.ReadBlocks(IEnumerable`1 blocks)

   at UiPath.Amazon.Textract.Client.TextractClient.d__28.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

   at UiPath.Amazon.Textract.Activities.AnalyzeMultipageDocumentActivity.d__35.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

   at UiPath.Amazon.Textract.Activities.AsyncActivity.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)

Birinder Singh
Posted 5 years ago

I need to only use the table extraction service and not the form extraction service since they both have different pricing on AWS. Is there a way we can differentiate this? Thanks

Mike Morse
Posted 5 years ago ago

Which APIs are you referring to where you can do table only extractions?  The UiPath Textract package uses the following Amazon Textract Apis :

https://docs.aws.amazon.com/textract/latest/dg/API_Operations.html

Neelima C
Posted 5 years ago

Hi,

We are working on implementing a Invoice processing flow using Amazon Textract within Uipath. We are taking the asynchronous approach. It is erroring out at the "Get Document Analysis" stage with below message -

Get Document Analysis: A value of type 'UiPath.Amazon.Textract.Client.Models.PageDetailCollection' cannot be set to the location with name 'Pages' because it is a location of type 'UiPath.Amazon.Textract.Client.Models.PageDetail[]'.

Now the Get Document Analysis output by default creates a variable with Type "PageDetail[]" and not "PageDetailCollection" (this is the output of Analyze Multiple Documents stage but we are not using that).

Request your assistance in resolving this issue.

Regards

Neelima

Mike Morse
Posted 5 years ago ago

Hi Neelima,

Thank you for reporting this. The issue has been resolved and will be published tomorrow as a patch fix 2.0.1.

Ted Lano
Posted 5 years ago

Doesn't work with PDF?  Amazon Textract does support PDF, but I get an error from this service saying "Invalid Document Type".  Can you update this package, or is there a code repo somewhere where we clone and can update ourselves?

Mike Morse
Posted 5 years ago ago

Which activity are you using?

Tomasz Kolodziejczyk
Posted 5 years ago

Hello,

I'm running into some issues working with this package (v.2.0.0).

1. Using the "Analyze Multipage Document" activity, I manage to execute a full flow, however the results obtained in the output variable of type "PageDetailCollection" seems to contain no meaningful data. Here's the result of a ".RawJson" on this output variable:

{"Blocks":[], "DocumentMetadata": { "Pages": 1} }

2. I've tried using the series of activities: "Start Document Analysis", "Get Document Analysis Status" and "Get Document Analysis" to do the same thing. The first activity did generate an AWS job. I checked the results of the Job outside of UiPath and it was indeed a successful Textract job. However, it seems that the result of "Get Document Analysis" does not have the type expected by the activity:

Get Document Analysis: A value of type 'UiPath.Amazon.Textract.Client.Models.PageDetailCollection' cannot be set to the location with name 'Pages' because it is a location of type 'UiPath.Amazon.Textract.Client.Models.PageDetail[]'.

3. Both "Get Document Analysis" and "Analyze Multipage Document" throw the following error when the "DiscoverColumnHeaders" flag is active:

Get Document Analysis: Cannot find column 0.

Please note that the document analysis works on the given document when done from a local script using AWS client libraries. This points towards an issue with the UiPath activies. Any help or suggestion would be highly appreciated.

Regards,

Tomasz Kolodziejczyk from Veolia

Mike Morse
Posted 5 years ago ago

Hi Tomasz,

I am the component owner and would like to assist you with this.  Since you have a number of specific questions could you please reach out to me @ mike.morse@ourcompanydomain.com so I can possibly get a sample document and get some more information from you.  Thanks.

Gaurav Sharma
Posted 5 years ago

Is data that is send to A,azon and recieved back encripted?

Mike Morse
Posted 5 years ago ago

All request made to the Textract service do occur over https.  In addition outbound requests to AWS are signed making them highly tamper resisitant while in transit.  Hope that helps.