Help - No Datarows issue

Hi Community,
Three times in the last month, the REFramework dispatcher that reads data from an excel attachment on an email has failed with the same No DataRows issue. Strangely, the bot works well before and after, and is only affected by certain emails, confirmed by testing. However, no difference in files is found and even sometimes if someone different sends the exact same file, it processes. Since this has now happened three times, it is moving from an annoying edge case to something more serious. Any thoughts or ideas how to troubleshoot or resolve the issue?
Regards,
Pat

No sure if it will help but I included error from UiPath Assistant below:

The source contains no DataRows.

at System.Data.DataTableExtensions.LoadTableFromEnumerable[T](IEnumerable1 source, DataTable table, Nullable1 options, FillErrorEventHandler errorHandler)
at System.Data.DataTableExtensions.CopyToDataTable[T](IEnumerable1 source) at Namespace_c77c.Read_Mail_Attachment_and_Populate_Queue_Expressions.Read_Mail_Attachment_and_Populate_Queue_Expressions_TypedDataContext3_ForReadOnly.__Expr11Get() at Namespace_c77c.Read_Mail_Attachment_and_Populate_Queue_Expressions.Read_Mail_Attachment_and_Populate_Queue_Expressions_TypedDataContext3_ForReadOnly.ValueType___Expr11Get() at Namespace_c77c.Read_Mail_Attachment_and_Populate_Queue_Expressions.InvokeExpression(Int32 expressionId, IList1 locations, ActivityContext activityContext)
at System.Activities.Expressions.CompiledExpressionInvoker.InvokeExpression(ActivityContext activityContext)
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
— End of stack trace from previous location —
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)

Found this article earlier but its solution did not resolve the issue for me.
Googled and searched through all articles on this issue.
It’s a real stumper.

The “no datarows” error returned when i sent the file from my email, but not for the customer when she sent from another email address. Puzzling

@FrankWilson,

How are you saving the attachment and how do you reading the excel file? I sit using Read range workbook activity? If yes try changing it to Excel Process Scope.

If root cause is hard to find, you can add a retry mechanism like

  1. Read the data from excel using read range workbook activity.
  2. Check if any data read.
  3. If no data read, try reading with another approach, Excel Process Scope

Even after this bot unable to read file, exit the bot gracefully by handling the exception in Try Catch and informing the support team/member to look into it.

Thanks,
Ashok :slight_smile:

Thank you @ashokkarale for your reply. Yes, using Read Range Workbook.
image
I will try the Excel Process Scope. Our our company, I am the business analyst, dev, and support team member all in one. Trying to get more people into UiPath, but the long and difficult certification process is a barrier, along with licensing.

@FrankWilson,

:smiley: One man army! You are doing great!

Feel free to get in touch whenever require any help.

Thanks,
Ashok :slight_smile:

1 Like

Hi Ashok,

It’s not clear to me what to add to the do block of the Excel Process Scope to read the Excel file and convert to a datatable simply like Read Range Workbook.

Thank you

Hi @FrankWilson ,

Could you let us know what activity gives out this error ? Did the Read Range Workbook activity throw out the error ?

For this scenario, could you maybe try performing a Debug to understand the point of error ?

Thank you Ashok,

Just tested with email that failed yesterday. The catch block with your suggestion processed the file without issues. Appreciate your time and help

1 Like

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