Execute a python script

I’m trying to execute a python script using the uipath python package. The sequence look fine: inside a python scope(load python script - invoke python method - get python object).
I’m using python 3.6.
The script has some libraries imported and I believe that’s the problem because when I run another script without libraries within the sequence works fine.
I get this error: Invoke Python Method: One or more errors occurred.
Any help on this?

Hello @bot11

Please refer to the below video. if you try with a simple python script is it working?

Hi Rahul, yes, I’ve already watched. Since he is using a very simple python script without importing libraries is not the same case. I tried running a simple script and woks fine. I think the problem is related to the python dependecies/libraries.

Make sure you have the python packages installed on your machine if you are using ones that are not installed by default.

For example sci kit:

pip install -U scikit-learn


I am not a python expert at all and there are fancier more robust ways of doing this I believe if you do some searches

Hi. I have them installed. But you made me think maybe not for version 3.6 that is the one I’m using. Will take a look on that. Thanks!

Let us know back here if it works as it might help people in the future.

1 Like

Hello @bot11

Here in this case you need to make sure you are using the same python compiler in which the libraries are installed… Then it will work fine during import.


1 Like