{"record":{"id":"101d64a76c9378d9","repo":"roboflow/supervision","slug":"invalid-table-position-supported-values-are-top","errorCode":null,"errorMessage":"Invalid table position. Supported values are: TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT.","messagePattern":"Invalid table position\\. Supported values are: TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/detection/line_zone.py","lineNumber":794,"sourceCode":"            table_position: The position of the table.\n            table_color: The color of the table.\n            table_margin: The margin of the table from the image border.\n            table_padding: The padding of the table.\n            table_max_width: The maximum width of the table.\n            text_color: The color of the text.\n            text_scale: The scale of the text.\n            text_thickness: The thickness of the text.\n            force_draw_class_ids: Instead of writing the class names,\n                on the table, write the class IDs. E.g. instead of `person: 6`,\n                write `0: 6`.\n        \"\"\"\n        if table_position not in {\n            Position.TOP_LEFT,\n            Position.TOP_RIGHT,\n            Position.BOTTOM_LEFT,\n            Position.BOTTOM_RIGHT,\n        }:\n            raise ValueError(\n                \"Invalid table position. Supported values are:\"\n                \" TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT.\"\n            )\n\n        self.table_position = table_position\n        self.table_color = table_color\n        self.table_margin = table_margin\n        self.table_padding = table_padding\n        self.table_max_width = table_max_width\n        self.text_color = text_color\n        self.text_scale = text_scale\n        self.text_thickness = text_thickness\n        self.force_draw_class_ids = force_draw_class_ids\n\n    def annotate(\n        self,\n        frame: npt.NDArray[np.uint8],\n        line_zones: list[LineZone],","sourceCodeStart":776,"sourceCodeEnd":812,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/detection/line_zone.py#L776-L812","documentation":"LineZoneAnnotator's constructor accepts table_position only from the four corner Position members (TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT); center positions like CENTER or CENTER_LEFT have no table layout, so anything outside the set is rejected at init.","triggerScenarios":"sv.LineZoneAnnotator(table_position=sv.Position.CENTER) or a string 'top_left' (strings are not accepted at all), or Position.BOTTOM_RIGHT of an older/newer enum variant that does not compare equal.","commonSituations":"Assuming table_position takes a string like other annotator color args; using sv.Position.CENTER from muscle memory; wanting a centered table and picking the nearest-looking enum.","solutions":["Use one of the four corners, e.g. sv.Position.BOTTOM_RIGHT (the common default for crossing tables).","If you want the table elsewhere, draw it manually with cv2.putText at your coordinates instead of the annotator.","Do not pass strings; pass sv.Position members."],"exampleFix":"# before\n annotator = sv.LineZoneAnnotator(table_position=\"top_left\")\n\n# after\n annotator = sv.LineZoneAnnotator(table_position=sv.Position.TOP_LEFT)","handlingStrategy":"validation","validationCode":"VALID_POSITIONS = {\n    sv.Position.TOP_LEFT, sv.Position.TOP_RIGHT,\n    sv.Position.BOTTOM_LEFT, sv.Position.BOTTOM_RIGHT,\n}\nif table_position not in VALID_POSITIONS:\n    raise ValueError(\"table_position must be a corner Position\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass sv.Position members, never strings.","Restrict config choices to the four corners with an enum in your own config schema.","Remember CENTER-like positions are intentionally unsupported for tables."],"tags":["line-zone","annotator","position","validation"],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}