Run Python Code

Unfortunately Sumeet you cannot do that. UiPath is built on top of Microsoft Workflow foundation framework and uses more sophisticated .xaml (WPF). Ironpython at the moment supports Xaml but cannot compile and run WF created Xaml. the extension of Uipath code is .xaml like Main.xaml. you can find that as below


You can try to investigate more by opening that in Notepad++ and see if there is a way to call and compile code using Python. But I would strongly suggest use to UiRobot.
you can go through their docs for that
https://robot.uipath.com/

Hi Sumeet,

You can use Orchestrator to start a process remotely either on demand or by a schedule.
There is a free course in UiPath Academy where you can find out how to use Orchestrator and there is also a community edition available.
Also, Orchestrator exposes a REST API which can be used to trigger the execution of a process from another tool, like your Python automation framework.

Thank you for the direct link to UiPath Robot.

Thank you for the direct link to the Orchestrator and REST API. So I have 2 questions arising out of your answer:

  1. You said Orchestrator and then mentioned ‘there is also the community edition’. Does that mean that the Community edition - the free one - doesn’t have Orchestrator module?
  2. So just to be clear, I’d have to prepare Orchestrator jobs to run my UiPath scripts and then I’ll have to call these Orchestrator jobs using the REST API?

@SumeetAgrawal

Uipath provides the demo Orchestrator with community edition but you have to register as a tenant to access it UiPath Orchestrator

Regards,
Sreekanth.k

1 Like

Maybe there will encounter a publish error like : ‘the package is too large’ .
so My suggestion is somethings like below:
1.install Ui Path platform instead of commnity version
2.Go to MyGet to creat your feed
3.Create tenant in https://demo.uipath.com
4.rewrite your Orchestrator setting like
Deployment URL: the feed name you created at step2
API Key: API key of your MyGet feed
5.To Publish a project

Regards,
lainh

I am a beginner in UiPath. So my questions might seem odd.
All above responses indicate that if I have to use a Community Version of UiPath, I will not be able to execute the tests locally? I will have to publish my project so that the entire project is like writing in GitHUB or something like that and then use the Orchestrator feed to run Robots for execution of my scripts?
So if I install community version, is there no way to execute my UiPath projects locally?

Locally,you can execute your projects through UiRobot by using some “bat” command like:

C:\Users{your name}\AppData\Local\UiPath\app-18.1.2\UiRobot.exe
-file:“D:\UiPath\InputArgument\Main.xaml” -input:{“inputValue”:“helloworld”}

A post was split to a new topic: How to execute Python script?

18%20PM

3 Likes

How can i use this…
Is there any sample workflow that i can start with?

Hi, Did u get your script running?
I am actually using Run Python Script inside the Python scope - but getting exceptions as it doesn’t seem to find a file… thanks!

This usually works if you use 32-bit python…
you have to just pass path of that into python scope…for e.g. “c:\python-32bit” the folder where 32 bit python.exe resides and then you are able to run python scripts.
Also make sure that you have set path of 32 bit python in environment variables in system properties of windows.

1 Like

Here is an example:

3 Likes

A post was split to a new topic: Run projects with Orchestrator CE

does this work with pandas framework too? As I cannot invoke it with the 32-bit invoke code activity.

I’ve used pandas by running a python file within an Anaconda environment.
If you are unfamiliar with anaconda:
https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html

where is the C# code support?
It’s almost 2nd Quarter over, still there is no beta release also :frowning:

Hi @VasuNaidu

I’m afraid I can’t be more specific than the fact that it is already on the roadmap for the coming months :slight_smile: Stay tuned!

Hi,
Please follow below tutorial on how to set python home path,how to load python script and python object activity and invoke python method activities demo