How to execute Python script?

activities
python

#1

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


Run Python Code
#2

Check the example here:


#3

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


#4

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


#5

hi @ovi

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


#6

hi,
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.


#7

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

Regards,
Som


#8

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


How to extract form values or editable text from PDF files?
#9

Hi,

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

Please let me know the changes to be done.

R’ds,
Som


#10

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.


#11

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)