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.
The script has to be in form of a function.
Example : def(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)