Problem with saving images in UiPath Assistant automation

I am currently having trouble with an automation I have created. The problem within my automation is to do with the Take Screenshot activity and the Save Image activity. In studio this automation works fine and saves the screenshot with no problem but when i publish the automation to UiPath assistant i receive the error below. This is the format of the directory ("A:\Location\Location2\Location3\Location4\Location5"+ FileName + “Details.png”).
FileName is a variable string with the name I want the file saved as, this all works when ran in studio but not in assistant.

Save image failed. Check if the file name is a valid path

at UiPath.Core.Activities.ObsoleteTaskAsyncCodeActivity`1.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)

The machine that is connected to assistant is connected to the same network as the one with the studio license both machines have access to all the same folders does anyone know why i could be having this problem?


Try to use a log message and print the path and check


1 Like

Log the path as mentioned. And also, the FileName start with “\” ? maybe the name of Location5 is concatenating with Filename+ “Details.png” instead …“Location5\”+ FileName + “Details.png”

1 Like

Thank you for your help the added log message revealed that the package was set to an earlier version with a different file directory which has now been amended.

1 Like

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