Error Loading Python Script - load python script activity

Hi team ,

I am trying to execute a python program in uipath using load python script inside python scope and also used invoke python method and get python object .
But it was throwing error
I am attaching my code here tell me what was the mistake i done here?

def Add(number1,number2):
out = number1+number2
return out
number1= int(input(“Type a number 1\n”))
number2= int(input(“Type a number 2\n”))

Let me know the mistake.
Python 3.6 (32 bit) is the version


Hi @Sriram07

It do support 32 bit version
Check this
Error when using "Load python script activity"


yeah it was working now just now i gave target as x84 sorry!!!
But problem here is when i run the bot it was executing so many minutes without giving an output.
Will you tell me why ?

As you are running the code in UiPath, it won’t print or allow the pop ups to enter data, all you need to do is pass the arguments from the UiPath using Invoke Python method.

For the code you have above :slight_smile:
Use this workflow , you will understand it easily… For the users to enter the values, use Input Custom Activity to enter the values and save them in two variables and pass them as parameters to the code in Invoke Python Method

Data table.xaml (7.0 KB)

1 Like

Thanks for the response firstly !!

I am just trying very simple code below

def add(a,b):

and using load script gave parameters as (10,20)

And printing the value using the result get python object.But i am getting empty message box help me bro !!!

Instead or print, use return statement in python code and use Get Python Object to get the response from the code as it is in the workflow attached above :slight_smile: @Sriram07

Then try to print it in message box

1 Like

Thank you so much Bro:sunglasses:!!!

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