Issue with the current directory path while working with libraries

@here,
I am running into a strange issue.
I have a common library that is used by 2 other Processes. This common library consumes an XLSX file from the Parent Project folder path ( /Data ). My fixes were simple conditions added to the common library and not changing anything related to file paths. After the new version of the common library was published, both the processes were updated to use the latest version. One of the Processes ran successfully consuming the common library and using the XLSX file from the \Data path of the Process. The other process - failed with the error message that it could not find the XLSX file.
It was looking in the path of the nuget package instead of the process folder that was calling it. Reverting to old version works fine. The studio version I am using is : 2020.4.1
Any idea what could be causing this ?

You are using relative path. Convert relative path to fixed path.

Hi @Anna_S ,

Can you show us what was the path earlier and what is now?

If the first process is working fine but not second that means you need to check the path used in second process.

The relative path used to work.

Both the “Parent Processes” have same folder structure. There is a excel file (data.xlsx) in the /Data folder. Both are calling the same Library activity. This activity is accessing the file using the relative path Data\data.xlsx. This used to work fine until the library package was updated to a newer version. This part of the code that accesses the excel was not changed.

Path of Process
C:\Users{{USERNAME}}\Documents\UiPath\RPA\MyProcess\Data\Decision Matrix.xlsx"

Path of Library - This is failing (obviously there is no file in this path)
C:\Users{{USERNAME}}\.nuget\packages\myLibraryPackage\1.0.59\lib\net45\Data\Decision Matrix.xlsx"

Error Message:
‘C:\Users{{USERNAME}}\.nuget\packages\myLibraryPackage\1.0.59\lib\net45\Data\Decision Matrix.xlsx’ is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

Has there been an update to this issue? I’m facing the same problem currently.

In case anyone else is looking for this thread, I think I found the answer. This will occur when your library uses “Modern Design” but your automation uses “Classic Design.” You should be able to go to your project settings, and change your library to match the processes that you are designing to avoid this error.

Hi all,

When you are working with library activities try to keep in separate work flow, and check the isolated property in invoke workflow properties then it will work

Regards,
Sesha