System.ArgumentNullException: Value cannot be null - where is the problem?

Hi there!

OK, so I have tried about everything now and I cannot figure out what I am doing wrong here. I know its telling me that it doesnt have a value.

The workflow is doing some extractions and screendumps from different websites to save later on in our archive. It furthermore create a word document where it replace some text and save that too.
It get all values from an application portal and different paths in windows where we have folders for different templates, documentation etc. I have triple checked that its the right paths, templates etc. as that would be the obvious problem as it has worked before.

It finds the right template and path to start creating the document in word. I use the assign activity to tell it that “FilStiDokument” is the path(as string) it has to use. Then I invoke the workflow that create the document. It then fails at the Word Application Scope in the invoked workflow.

I’ve checked that the arguments is correct and that I have imported the arguments and given it the correct value.

The Word Application Scope works in other workflows, so the problem must be in that specific workflow where it cant find the value.

It seems so simple and i have probably just stared at it too much now to see the solution.

I hope some of you guys can guide me a little further to solve this problem.

Best regards

Martin


I get his error message:

System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Path.GetFullPathInternal(String path)
at UiPath.Word.WordDocument…ctor(String documentPath, Boolean createNew)
at UiPath.Word.Activities.WordApplicationScope.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

A screenshot more

SD3

And one more - sorry for the spam. As new user i cant put more than one image in a post at a time.

1 Like

No worries kindly check whether the variable has any value in it
use write line before to this start process and mention those variables and check in the output panel whether any value is getting displayed
with that we can debug whether the value is passed or not
thats the issue
you were almost done
Cheers @MartinLorange

Make sure that IN/OUT argument is set with value and is passed properly to a variable in the workflow,
–to check whether the argument is assigned or not click on ARGUMENTS property in the property panel and not the import arguments as it will freshly import arguments without any value

So kindly check this and let know for any queries or clarification
Cheers @MartinLorange

Hi @Palaniyappan

Thanks for the quick response - i did not think of a write line before the start.
I have put in write line before the Word Application Scope and it doesnt have a value in it from the main workflow.

I have checked a few more places in the workflow and I can see that a former employee uses the argument “FilStiBrev” more places before it invokes the new workflow. But shouldnt it still have some value with it even if it overwrites the first value?

Hi again @Palaniyappan

Thank you - i took the hard way and searched the whole workflow from top to bottom and all arguments. Used the write line as you said and found out that it was a different place it failed with the values.

I found out that the default value that was set did not correspond with the actual value, so when i changed it back, it worked.

Great
Cheers @MartinLorange

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