How to execute Python script?

Can anyone share a demo file on how to execute a python script from UiPath?

1 Like

Check the example here:


Thanks a lot. I was using python 3.7 64-bit. Maybe that was the reason it wasn’t working

Yes, for now only the 32-bit one works.

1 Like

hi @ovi

I am trying to run the code but I am getting this error.
Please help.

Have you mentioned the version also in properties of this python scope activity , if you are working with python 36 then give version as Python 36.
If this also does not work then try to give path of Python35 in python scope activity and give version also Python_35 in properties of this activity.
Your problem will be resolved.

1 Like

Can you please share any XAML where you have integrated python with UiPath?
A basic will also work.


Hi @somya177
Flowchart.xaml (10.7 KB)

please find attached workflow and the script file which i am running , i am passing the parameters to the script and getting the output in uipath


I am unable to execute it.It’s throwing error:

Please let me know the changes to be done.


Hi @somya177

Flowchart.xaml (10.8 KB)

now i have given the small script , copy paste the script file to some folder and then in the workflow change the pythonScriptPath according to your script path.
so whatever string you pass in the attachName you will get the length of that string in the output.

Hi @somya177 and @Rishi1,

I am new to UiPath. I was trying to execute a simple python script and run into the same error as shown above in this thread. I am attaching the xaml file . Please help.

pythontest.xaml (7.0 KB)

Hi @vedantnarayan
is your python exe path correct?

@Rishi1 Yes. Please refer this screenshot.

Hi @vedantnarayan
give this much path “C:\Python35”

1 Like