Hi. I am loading a web application which takes a while so I um using a CV Screen Scope and CV Elements exists within a Do While loop with a delay. This then continues to check if the application is loaded and if not then a delay kicks in. This works perfectly fine. During the process I need to change to a different database and I have added another CV Screen Scope and CV Elements as the loading processes is the same and it takes some time to load.
After adding the second CV Screen Scope I get the following error message.
An item with the same key has already been added. Key: UiPathScreenOCR_1
I have added screenshots of the 2 CV Scope but when I do a Ctrl+F and search for UiPathScreenOCR it find 2 occurences but it is the Activity Name. I can’t locate any other places where this is defined.
The properties of each OCR are shown in the attached pictures. The Output Result is different for each of the OCR activities. Still not sure why the error occurs and how to resolve it.
I see that you’re taking the output in the KeyValue form of pairs in the result variable.
Can you try taking the output in Text output and then work on it.
It might be the case that from the first/second OCR activity, there are certain key value pairs being extracted out which are coming again and again, hence a duplicate key value pair is being pushed into the records and hence that error is coming.