How to fix Length cannot be less than zero

“message”: “System exception at initialization: Length cannot be less than zero.\r\nParameter name: length at Source: Invoke GetFilesFromGDrive workflow: Invoke ProcessPDF workflow: Invoke ReadCompanyPDF workflow: Assign”,
“level”: “Error”,
“logType”: “User”,
“timeStamp”: “12:37:48”,
“fileName”: “Main”,
“processVersion”: “1.0.0”,
“jobId”: “aea2091a-745c-4f2e-8593-0cd6fd863f84”,
“robotName”: “”,
“machineId”: 2337573,
“organizationUnitId”: 3506788

In which activity are you getting this Error?
Please elaborate.

i am trying to run file but process can not start its showing this error again and again.

Run your process in debug mode and Check which in activity you are getting this error.

As it it showing in Error it has error in Assign activity of Invoke ProcessPDF Workflow.
Can you check it has the same issue and share me value of Assign Activity.


Share Value of Assign Activity and in_pdfText argument.

can you please see

I mean to say is what you have Assigned in str Variable of Assign Activity.
Like In_pdfText.Substring…(I need this whole Expression that you have Passed in str Variable)

Hello @Bot_Submission i think you are newbie to Uipath and you are Unable to Understand My Point.
This Screenshot you have shared is showing value of str variable at RunTime.
But if you want to fix this Error i need to check that which String Operations you have performed in Assign Activity.

Can you Share me screenshot like this.
Open Properties of Assign Activity and Click on Three dots of Value Propertie.

Let me know if you have any Query.

@Bot_Submission It looks like the length that you are passing in the substring is less than 0 . That could be the reason it is showing this error. If you are passing length, can you please print the length in a message box and see what is is giving

Also, share the expression that you have written in the assign activity

@Bot_Submission Can you print the in_pdfText.IndexOf(strEmail) in a message box also print the in_pdfText.IndexOf(strAdd)-in_pdfText.IndexOf(strEmail) in a separate message box and see what it is giving. Place these message box before assign activity and check. Just to know which is the value is less than 0


@Bot_Submission Can you please explain what is the value that is getting in in_pdfText and what is the output that you are expecting

yes in_pdfText is a form and I want output to read the details in the pdf form

like email, address

@Bot_Submission Can you share sample data with an example

sorry but I can’t share because of company policy if you able to access my pc please let me know