Can you try running the file in the actual environment instead of running in virtual environment?
That is one of the issues I faced earlier and run the code in Load Python Script activity which will let you know where the code is failing?
Can you try running the file in the actual environment instead of running in virtual environment?
That is one of the issues I faced earlier and run the code in Load Python Script activity which will let you know where the code is failing?
Is version would be a problem? because i have downloaded python 3.7 but uipath have version upto 3.6
How to assign python object variable in load python script
Nothing you need to assign, just use the path in python scope and within that, use Load Python Activity and give the path
getting error in loading script , is version will be the problem?
May be… What is the error? Can you post the screenshot please?
The thing is that, I’m getting the same when I run the code you uploaded, open and check the details so you can found some error there regarding pytesseract.
when i run that script am getting output, but while running through uipath am not getting anything.
Yeah @DivyaT,
That is known thing with UiPath … As we have discussed, it may be a version issue as well. Python 3.7 is compatible with uipath is still a question for me? If you have any chance, try installing 3.6 version and check. Caution: Don’t use Virtual environments in UiPath
ok thank you
After install 3.6 also am getting repeated errors, can anyone please give solution am facing difficulty in this.
Hi @DivyaT
Just to clarify - is your Python exe file in this location?
C:\Users\user\AppData\Local\Programs\Python\Python37\Scripts
This path should be the path to the folder with the python exe file.
yes this is my python execution path,Actually am using pycharm interprete with python v3.6.7
Hi Divya,
Can you share your python file?
Hi Divya,
I have gone through the code and script.
You cannot directly run a python script through UiPath. It isn’t a reliable approach or a stable approach to follow.
Python script:
The script has to be in form of a function.
Example : def(a,b):
return(a+b)
I have transformed your script into a function. It requires two inputs.
Inp PDF file and Op Excel file.
Pass them in the UiPath program and it’ll run.
Also, make sure you have the necessary libraries installed.
Inside Python Scope,
First Load the python script. It creates an Instance
Pass the first instance to Invoke Python Method Activity. Give the necessary Input and Output.
It will call that particular method and perform the task.
In a Py function, you return something. So, the Get python Object activity fetches the Output of the function.
Attaching the zip file, Please go through it.
PyOCR.zip (3.0 KB)
In UiPath PDF activities are available to convert PDF to text.then why we need python script? Just curious to know is there any added advantage in this…please anyone explain
@DivyaT Maybe a Workaround(since I am using Python 3.7.1) would be using “Start Process” Activity in UiPath.
A Simple python code that I have would launch Chrome and Navigate to Google.com.
I run the Python Script using “Start Process” Activity. (Optionally Parameters Can be passed as well)
Worth giving a try and let me know if it works.
Hello @Rahul_Pasupuleti,
I am trying to execute your python script, But facing endpoint issue.
Can you please check the attached screenshot. Help me on this!