{"record":{"id":"1ba1d1788546dc3e","repo":"sgl-project/sglang","slug":"content-must-be-a-imageinput-but-got-type-self-c","errorCode":null,"errorMessage":"content must be a ImageInput, but got {type(self.content)}","messagePattern":"content must be a ImageInput, but got (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/multimodal/processors/mimo_v2.py","lineNumber":199,"sourceCode":"    content: TextInput | ImageInput | VideoInput | AudioInput | VideoAudioInput\n    is_target: Optional[bool] = None\n\n    def __post_init__(self):\n        if self.type not in [\"text\", \"image\", \"video\", \"audio\", \"video_audio\"]:\n            raise ValueError(\n                f\"type must be one of text, image, video, audio, video_audio, but got {self.type}\"\n            )\n        if self.type == \"text\":\n            if not isinstance(self.content, (str, list)) or (\n                isinstance(self.content, list)\n                and not all(isinstance(item, int) for item in self.content)\n            ):\n                raise ValueError(\n                    f\"content must be a str or a list of ints, but got {type(self.content)}\"\n                )\n        elif self.type == \"image\":\n            if not isinstance(self.content, ImageInput):\n                raise ValueError(\n                    f\"content must be a ImageInput, but got {type(self.content)}\"\n                )\n        elif self.type == \"video\":\n            if not isinstance(self.content, VideoInput):\n                raise ValueError(\n                    f\"content must be a VideoInput, but got {type(self.content)}\"\n                )\n        elif self.type == \"audio\":\n            if not isinstance(self.content, AudioInput):\n                raise ValueError(\n                    f\"content must be a AudioInput, but got {type(self.content)}\"\n                )\n        elif self.type == \"video_audio\":\n            if not isinstance(self.content, VideoAudioInput):\n                raise ValueError(\n                    f\"content must be a VideoAudioInput, but got {type(self.content)}\"\n                )\n","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/multimodal/processors/mimo_v2.py#L181-L217","documentation":"Error \"content must be a ImageInput, but got {type(self.content)}\" thrown in sgl-project/sglang.","triggerScenarios":"Thrown at python/sglang/srt/multimodal/processors/mimo_v2.py:199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}