{"record":{"id":"b759aee7dae82069","repo":"roboflow/supervision","slug":"task-not-supported-supported-tasks-are-suppor","errorCode":null,"errorMessage":"{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}","messagePattern":"(.+?) not supported\\. Supported tasks are: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/detection/vlm.py","lineNumber":541,"sourceCode":"        resolution_wh: (output_width, output_height) to which we rescale the boxes.\n\n    Returns:\n        A tuple of `(xyxy, labels, masks, obb_boxes)` where `xyxy` is an array\n            of shape `(n, 4)` in format `[x1, y1, x2, y2]`, `labels` is an\n            optional array of shape `(n,)` with class labels, `masks` is an\n            optional array of shape `(n, h, w)` with segmentation masks, and\n            `obb_boxes` is an optional array of shape `(n, 4, 2)` with oriented\n            bounding boxes.\n\n    Raises:\n        ValueError: If the top-level Florence 2 payload has multiple tasks or\n            if a task payload is malformed.\n    \"\"\"\n    if len(result) != 1:\n        raise ValueError(f\"Expected result with a single element. Got: {result}\")\n    task = next(iter(result.keys()))\n    if task not in SUPPORTED_TASKS_FLORENCE_2:\n        raise ValueError(\n            f\"{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}\"\n        )\n    result = result[task]\n\n    if task in [\"<OD>\", \"<CAPTION_TO_PHRASE_GROUNDING>\", \"<DENSE_REGION_CAPTION>\"]:\n        xyxy = np.array(result[\"bboxes\"], dtype=np.float32)\n        labels = np.array(result[\"labels\"])\n        return xyxy, labels, None, None\n\n    if task == \"<REGION_PROPOSAL>\":\n        xyxy = np.array(result[\"bboxes\"], dtype=np.float32)\n        # provides labels, but they are [\"\", \"\", \"\", ...]\n        return xyxy, None, None, None\n\n    if task == \"<OCR_WITH_REGION>\":\n        xyxyxyxy = np.array(result[\"quad_boxes\"], dtype=np.float32)\n        xyxyxyxy = xyxyxyxy.reshape(-1, 4, 2)\n        xyxy = np.array([polygon_to_xyxy(polygon) for polygon in xyxyxyxy])","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/detection/vlm.py#L523-L559","documentation":"Error \"{task} not supported. Supported tasks are: {SUPPORTED_TASKS_FLORENCE_2}\" thrown in roboflow/supervision.","triggerScenarios":"Thrown at src/supervision/detection/vlm.py:541 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported Florence-2 tasks listed in the error message (e.g. object detection, caption, OCR variants).","For unsupported Florence-2 prompts, parse the raw string output manually instead of using the connector."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}