流程在uipath studio里运行正常,uipath Assistant里运行时提示源文件不存在


流程在UiPath studio里运行正常,UiPath Assistant里运行时提示源文件不存在

Hi @hj.huang

This issue usually occurs because the file path used in the workflow is not accessible when the process runs from UiPath Assistant.

In UiPath Studio, the process runs in debug mode using your local environment, but when executed from Assistant the Robot may use a different working directory.

Please check the following:
1 Ensure the source file exists in the specified path at runtime.
2 Avoid using hardcoded local paths like C:\Users.…
3 Try using a relative path such as Path.Combine(Environment.CurrentDirectory,“filename”).
4 Confirm the Robot user has permission to access the folder.

Adding a File Exists / Path Exists check before the Rename/Move activity can also help validate the file path during execution.

If solution works for you please mark as Solution & Happy Automations with UiPath

Thanks

The path is set like this
image

@hj.huang it looks like path using in flow is small d but actually path looks like capital D
Please update the path like Data\Input\JQCC004.0002.xlsx
Then republish the process and run it again from UiPath Assistant. This usually resolves the “Source file does not exist” issue when using relative paths.
Hope it helps now
If solution works for you please mark as solution
Thanks

Even after the change, this error message still persists !

Could you please share the error details or screenshot

Hello @hj.huang,

Are you downloading this file in the process itself or it is just static template file?

Firstly - use- log message activity to display the path of the file in logs

Then put a file exists activity before you access this file.

In case of downloading the file to this folder in real time

If file does not exists - please add delay (static 5 sec or use while loop to check the file again -dynamic delay → 1 sec → 2 sec ;increment/multiple delay - exponential backoff)
until the file is downloaded then use break activity to come out of while loop.

In case of static file- I would say copy the file path from logs and open VM and check manually if file exists (feels file is corrupted or some other issue)

hope it helps!