How do I use Invoke Python acitivities

activities
studio
invoke
python

#1

WIth the release of a new version of UiPath, python support has been added. Could anyone please give me some working examples of how I can invoke a python function, method or something to my project?

Unfortunately the description of the methods on the official UiPath website doesn’t really make it clear to me how to use it.

For instance, I need to run a very simple python code where I have some input variables and maybe some output. What activity do I use for it?

Another question: what if my python code contains an imported library, can it be invoked to UiPath as well?


#2

Please check this - https://activities.uipath.com/docs/invoke-method


#3

Please check this sample workflow (it assumes that Python 3.6 is installed at “C:\Python36”): PythonActivitiesTest.zip (2.5 KB)

After loading the script with the Load Python Script activity, you can call a method in a script using Invoke Python Method’s input property called Input parameters.
Invoke Python Method returns a PythonObject that can be passed to the the Get Python Object activity for conversion into a .NET object.


#4

Thank you, I’ll take a look at this


#5

Hi,

are u using Python36 32 bit?
Thanks!


#6

Hai @MGMKLML

Find the link you will get an idea.,

Regards,
D.Aravind


#7

How do I correctly check the version of python?


#8

Thank you, I’ll have a look :slight_smile:


#9

Yes, currently it needs to be 32bits:

The Python Activities Pack works only with 32-bit Python scripts.


#10

How do I install the 32-Python, could you please hint me? I’m not very good at Python


#11

Go to https://www.python.org/downloads/windows/ and download “Windows x86 executable installer”. After that, just run the installer like any other software.


#12

@Mateus_Cruz, Okay thank you