I am trying to invoke this python code using invoke method activity of UiPath. This code simply extracts the data from the qr code. I have stored qr code in png format.
def extract(imagepath):
import cv2
# Read the image using OpenCV
image = cv2.imread(imagepath)
# Initialize the QR code detector
detector = cv2.QRCodeDetector()
# Detect and decode the QR code
data, bbox, _ = detector.detectAndDecode(image)
if data:
return data
else:
return None
But I am getting error Invoke Python Method: One or more errors occurred. (Error invoking Python method). I am passing path name dynamically too. To test whether there are some installation issues or not for that I created another small sequence to invoke addition code that is working completely fine means python and .net runtime has been properly installed.
