Unable to load Python object when there is a import method inside the py script

I am using Invoke python method to invoke a method inside a script. It works fine if I use it normally. However, the UiPath Invoke Python method fails when i import values from another .py script.

Working Python script:

def test():
pass

Failing Python Script:

from common import *
def test():
pass

Note: common.py file is located on the same folder.

Somehow i feel Invoke python method does not work out if we use the value from a different file.

Error: image

Please do not paste the other common links that come up while searching the “Pipe broke errors” as I have gone through all the links and spent enough amount of research on the issue.

BTW, i am using the latest uipath python packages (1.4.1)

Hi @Pavan_Gunda

Your import is relative to your python project. Have you either:

  • set Working Folder in the Python Scope activity
  • set the project’s directory into PythonPath environment variable
  • make UiPath copy your project into a directory included that is handled by both previous points ?

If you want to display the python traceback (instead of the infamous “pipe is broken”), you can downgrade your UiPath.Python.Activities library just the time to troubleshoot the issue.

Good catch & Thank you . Your reply worked out for me. I missed out to add the working folder in the python scope activity.

1 Like

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