# Persistent Google Vision OCR Workflow Error

**URL:** https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271
**Category:** 🤝  Community Help
**Created:** [January 16, 2025, 4:24pm UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271 "2025-01-16T16:24:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![IA\_Prosys](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ia_prosys/32/6402_2.png) [@IA\_Prosys](https://discuss.roboflow.com/u/IA_Prosys)
#### Post date: [January 16, 2025, 4:24pm UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271/1 "2025-01-16T16:24:01Z")

</div>

Hi everyone,

I’m facing a consistent issue with the Google Vision OCR workflow in Roboflow. I’m encountering two distinct error messages:

`Error 1:  
{  
“error”: “Error during execution of step: $steps.google\_vision\_ocr. Details: ‘y’”,  
“inner\_error”: “‘y’”  
}

Error 2:  
{  
“error”: “Error during execution of step: $steps.google\_vision\_ocr. Details: ‘x’”,  
“inner\_error”: “‘x’”  
}`

I’ve noticed a peculiar behavior with both Error 1 and 2. In some cases, the OCR fails to detect any text because the vehicle is angled and obviously, a license plate can’t be detected, yet it doesn’t throw that error. However, when I test multiple images in the same JPG format, I get this error even if there’s no license plate, which I find strange. With other images where the license plate is visible, it works fine, so I’m unsure what’s happening with certain images. I’m testing with the images provided to me, all in the same format but not necessarily the same resolution. Even within the same resolution, some work and others don’t

I’m wondering if anyone else has encountered similar behavior or has any insights into potential causes. Any suggestions or solutions would be greatly appreciated.

 ![Error](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/2/205d712e61376e73e6dffe82d0b9dffd37861604.jpeg)

---

<div class="post-metadata">

### Author: ![Grzegorz](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/grzegorz/32/2877_2.png) [@Grzegorz](https://discuss.roboflow.com/u/Grzegorz)
#### Post date: [January 17, 2025, 9:45am UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271/2 "2025-01-17T09:45:47Z")

</div>

Hi @IA_Prosys ,

On the left-hand-side of workflow editor there is a panel you can open by clicking `>` - can you share JSON workflow definition from this panel?

Thanks!  
Grzegorz

---

<div class="post-metadata">

### Author: ![IA\_Prosys](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/ia_prosys/32/6402_2.png) [@IA\_Prosys](https://discuss.roboflow.com/u/IA_Prosys)
#### Post date: [January 17, 2025, 12:10pm UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271/3 "2025-01-17T12:10:54Z")

</div>

```json
{
  "version": "1.0",
  "inputs": [
    {
      "type": "InferenceImage",
      "name": "image"
    }
  ],
  "steps": [
    {
      "type": "roboflow_core/roboflow_instance_segmentation_model@v1",
      "name": "model",
      "images": "$inputs.image",
      "model_id": "danos_v1/18",
      "confidence": 0.1,
      "iou_threshold": 0,
      "active_learning_target_dataset": "danos_v1"
    },
    {
      "type": "roboflow_core/detections_filter@v1",
      "name": "detections_filter",
      "predictions": "$steps.model.predictions",
      "operations": [
        {
          "type": "DetectionsFilter",
          "filter_operation": {
            "type": "StatementGroup",
            "operator": "and",
            "statements": [
              {
                "type": "BinaryStatement",
                "negate": false,
                "left_operand": {
                  "type": "DynamicOperand",
                  "operand_name": "_",
                  "operations": [
                    {
                      "type": "ExtractDetectionProperty",
                      "property_name": "class_name"
                    }
                  ]
                },
                "comparator": {
                  "type": "in (Sequence)"
                },
                "right_operand": {
                  "type": "StaticOperand",
                  "value": [
                    "Patente"
                  ]
                }
              },
              {
                "type": "BinaryStatement",
                "left_operand": {
                  "type": "DynamicOperand",
                  "operand_name": "_",
                  "operations": [
                    {
                      "type": "ExtractDetectionProperty",
                      "property_name": "confidence"
                    }
                  ]
                },
                "comparator": {
                  "type": "(Number) >="
                },
                "right_operand": {
                  "type": "StaticOperand",
                  "value": 0.5
                }
              }
            ]
          }
        }
      ],
      "operations_parameters": {},
      "uistate": {
        "selectedFilterType": "filter_by_class_and_confidence",
        "isClassFilteringActive": true,
        "isConfidenceFilteringActive": true,
        "classSetInclusionMode": "in",
        "classList": [
          "Patente"
        ],
        "confidenceThreshold": 0.5,
        "confidenceOperator": ">=",
        "referenceImage": "$inputs.image",
        "zoneOperator": "in",
        "isZoneStatic": true,
        "zonePoints": [],
        "detectionReferencePoint": "center",
        "dynamicZone": null,
        "detectionsOffset": [
          0,
          0
        ]
      }
    },
    {
      "type": "roboflow_core/polygon_visualization@v1",
      "name": "bounding_box_visualization",
      "predictions": "$steps.detections_filter.predictions",
      "image": "$inputs.image"
    },
    {
      "type": "roboflow_core/crop_visualization@v1",
      "name": "crop_visualization",
      "image": "$steps.bounding_box_visualization.image",
      "predictions": "$steps.detections_filter.predictions",
      "scale_factor": 0.3
    },
    {
      "type": "roboflow_core/dynamic_crop@v1",
      "name": "dynamic_crop",
      "images": "$steps.crop_visualization.image",
      "predictions": "$steps.detections_filter.predictions"
    },
    {
      "type": "roboflow_core/google_vision_ocr@v1",
      "name": "google_vision_ocr",
      "image": "$steps.dynamic_crop.crops",
      "ocr_type": "text_detection",
      "api_key": ""
    },
    {
      "type": "roboflow_core/roboflow_dataset_upload@v2",
      "name": "roboflow_dataset_upload",
      "predictions": "$steps.model.predictions",
      "images": "$inputs.image",
      "usage_quota_name": "upload_quota_atoyQ",
      "target_project": "danos_v1"
    },
    {
      "type": "roboflow_core/polygon_visualization@v1",
      "name": "polygon_visualization",
      "predictions": "$steps.model.predictions",
      "image": "$inputs.image",
      "copy_image": "$steps.roboflow_dataset_upload.error_status"
    },
    {
      "type": "roboflow_core/label_visualization@v1",
      "name": "label_visualization_1",
      "image": "$steps.polygon_visualization.image",
      "predictions": "$steps.model.predictions",
      "text_scale": 0.6,
      "text_padding": 2
    }
  ],
  "outputs": [
    {
      "type": "JsonField",
      "name": "google_vision_ocr",
      "coordinates_system": "own",
      "selector": "$steps.google_vision_ocr.*"
    },
    {
      "type": "JsonField",
      "name": "predictions",
      "coordinates_system": "own",
      "selector": "$steps.model.predictions"
    },
    {
      "type": "JsonField",
      "name": "detections_visualization",
      "coordinates_system": "own",
      "selector": "$steps.label_visualization_1.image"
    }
  ]
}

```

---

<div class="post-metadata">

### Author: ![Thomas\_Hansen](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/thomas_hansen/32/5153_2.png) [@Thomas\_Hansen](https://discuss.roboflow.com/u/Thomas_Hansen)
#### Post date: [January 17, 2025, 9:27pm UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271/4 "2025-01-17T21:27:28Z")

</div>

Hi @IA_Prosys,

Thanks for reporting this bug. We found the issue resulting in these errors. For some reason the Google vision API sometimes returns vertices with only a x or y coordinate, which doesn’t match their documentation. We tested aroudna bit and feel pretty sure that setting those to 0 seems to make sense.

There is a PR with a bugfix open here: [Fix Google Vision Block bounding box parsing by brunopicinin · Pull Request #961 · roboflow/inference · GitHub](https://github.com/roboflow/inference/pull/961)

I expect it to make it into next week release, at which point our hosted api will also reflect the bugfix.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)
#### Post date: [February 7, 2025, 9:27pm UTC](https://discuss.roboflow.com/t/persistent-google-vision-ocr-workflow-error/8271/5 "2025-02-07T21:27:55Z")

</div>

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