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”))
a=number1
number2= int(input(“Type a number 2\n”))
b=number2
res=Add(a,b)
print(res)
Let me know the mistake.
Python 3.6 (32 bit) is the version
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
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
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 @Sriram07