Invoke python method problem! cannot use .py file for all day!

Dear Forum,

I’m trying to use python code in UiPath,
I want to use the function call ddddocr,
and bellow is my .py file:

def OCRfumction(filePath):
import ddddocr
ocr = ddddocr.DdddOcr()
with open(filePath, ‘rb’) as f:
img_bytes = f.read()
res = ocr.classification(img_bytes)
return res

I always stock at Get Python Object: Error converting Python object
please help!

!!!This file is not the correct Answer, you cannot use it without tune your code by the next response!!!

OCRtest.zip (12.5 KB)

1 Like

I found the solution,
Here is my setting

圖片
圖片


圖片
圖片



圖片

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