I have written python code in pycharm, I have to run that script using Uipath, I tried by using run python script inside python scope in UI path. Am not getting any error, I have provided necessary path but not getting output. Please If anyone gives a solution on how to run this script will be useful to learn.
yes am trying to get output, i have written the script for converting scanned pdf to image and extracting the text but am not getting anything after ran the script using uipath.
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.
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
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.