Python Scope: Error initializing Python engine - Can't RUn python script

I wrote a simple regex method in python that I would like to invoke, it receives a text as input and outputs a regex dictionary to UiPath (that is my goal), I’ve tried to use the python activities and I keep getting this error it doesn’t even enter python scope:


this is my regex example:

can it be by the libraries imported? How does anyone have an idea how can i do it? I simply wrote it in python because i didn’t want to use several matches activities because I have to extract a lot of info. In this case I use a dictionary because (KEY, Value) my key would be an anchor to search in all the pdfs files (they are not structured) and give me the corresponding value. each key(anchor) is unique for all pdfs and I extract everything from them associated with the key

@Rodrigo_Silva

Can you select the version Instead of Auto to a specific version you have in your system and try

Hope this may help you

Thanks,
Srini

Still doesn’t work if I set to >=3.10

@Rodrigo_Silva

Check below post for your reference

Hope this may help you

Thanks,
Srini

Already checked before, but nothing works… ty anyway

@Rodrigo_Silva

Is the path provided is correct?

Please validate…i
This is the installation path for example

C:\Users\name\AppData\Local\Programs\Python\Python310

Cheers

1 Like

orello @Rodrigo_Silva , In Command prompt, the type where python. The Python path will get and copy-paste paste path in Path Properties and the Working folder should be the path of the script located.
Also, provide the Version details and Library path. Check the Target is x64

1 Like

If you are using Python 3.11.x it will not work in UiPath Studio at this moment. I tested with a Python 3.10.10 64-bit and it is working.

In order to check your Python version, you can run in cmd.exe the python --version command.

2 Likes

Thank you all for your time, all the paths were correct the solution is downgrading the python version

1 Like

By the way for me only worked with python 3.7 version I’ve tried from the 3.10 to 3.7 :), One more time thanks a lot for the feedback have a nice day!

1 Like

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

This a small message from the future :slight_smile:

A new version of the Python package 1.7.1 was released which supports Python 3.11 (you can grab it from the official feed).

3 Likes