My process encounters an error when working on robot but it works well in studio environment

Dears,

My process encounters an error message, as below, when working on Robot.
“Index was outside the bounds of the array.”

But it is well in studio environment.
What’s wrong between the two?

The process going wrong might be saving attachment from outlook.
Because the robot has read the mail without saving any attachment.

I am using the activity : save attachments with filter “.xlsx”

Hello @j1070148
The error is occurred because of passing the value outside of the array.
For example, there are 4 values in an array, if we try to get the 5th value, the error will throw.
So check your code where the error occurs.
Note: array index always starts with 0, if you need 1st value use Array(0).to string and vice versa

HI @j1070148

Welcome to UiPath community

This error seem like you are trying to use more element in the specified array size

Check out this video link

Regards
Gokul

Thanks for reply.

But my process work well in the environment of Studio.
After publishing to Uipath Assistant, My process encounters an error message:
“Index was outside the bounds of the array.”

So, it might not be the problem of outside of the array, or in that case my process would go wrong in Studio.

I am wondering there any different set up between studio and assistant?

HI @j1070148

Can you check the inbox whether do you have an mail with an attachment [Extension as .xlsx]?

And also the check out the mail activity properties too

Check the path that you are saving the attachment?

Regards
Gokul

@j1070148
If possible, an entire error message that you are facing. It helps us to provide you with a better solution.

Hello @j1070148

There should not be any error in Robot it works well in studio. This seems to be error in the index of the array that is declared.

Can you please confirm whether the error is happening at some particular step? and have you provided the array value with an index? If you share the screenshot of the workflow that will help.

Thanks

I have check my inbox.
An unread mail with an attachment with extension “.xlsx” exists in my inbox.

Below image is my flow in studio. And my flow is working in studio environment.

But it fail after publishing to Robot.
image

So, i have no idea why it works in Studio but fails in robot.

HI @j1070148

Check out this screenshot and replicate like that way?

Regards
Gokul

Dears,
Thanks for your help.
I has solved the problem.

Because the path attachment saved is different in studio and in robot.

In Studio, it is acceptable for using the path omitting “C://…”, because studio would assume to use the same path which main.xaml exists if there is no complete path.

However, in robot, the assumed path is different with the path main.xaml existing.

So, in this case, just using the complete path in activity: save attachments can solve the problem.

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