{"record":{"id":"5ded550332553ba8","repo":"huggingface/transformers","slug":"only-a-single-or-a-list-of-entries-is-supported-bu-5ded55","errorCode":null,"errorMessage":"only a single or a list of entries is supported but got type={type(image_url_or_urls)}","messagePattern":"only a single or a list of entries is supported but got type=(.+?)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"src/transformers/image_processing_base.py","lineNumber":487,"sourceCode":"            raise ValueError(f\"{auto_class} is not a valid auto class.\")\n\n        cls._auto_class = auto_class\n\n    def fetch_images(self, image_url_or_urls: str | list[str] | list[list[str]]):\n        \"\"\"\n        Convert a single or a list of urls into the corresponding `PIL.Image` objects.\n\n        If a single url is passed, the return value will be a single object. If a list is passed a list of objects is\n        returned.\n        \"\"\"\n        if isinstance(image_url_or_urls, (list, tuple)):\n            return [self.fetch_images(x) for x in image_url_or_urls]\n        elif isinstance(image_url_or_urls, str):\n            return load_image(image_url_or_urls)\n        elif is_valid_image(image_url_or_urls):\n            return image_url_or_urls\n        else:\n            raise TypeError(f\"only a single or a list of entries is supported but got type={type(image_url_or_urls)}\")\n\n\nImageProcessingMixin.push_to_hub = copy_func(ImageProcessingMixin.push_to_hub)\nif ImageProcessingMixin.push_to_hub.__doc__ is not None:\n    ImageProcessingMixin.push_to_hub.__doc__ = ImageProcessingMixin.push_to_hub.__doc__.format(\n        object=\"image processor\", object_class=\"AutoImageProcessor\", object_files=\"image processor file\"\n    )\n","sourceCodeStart":469,"sourceCodeEnd":495,"githubUrl":"https://github.com/huggingface/transformers/blob/a597f974857b3d92939971296bc0deb93d33d780/src/transformers/image_processing_base.py#L469-L495","documentation":"Error \"only a single or a list of entries is supported but got type={type(image_url_or_urls)}\" thrown in huggingface/transformers.","triggerScenarios":"Raised in ImageProcessingMixin image loading when image_url_or_urls is neither a single entry nor a list.","commonSituations":"Passing a dict, tuple-of-tuples, or generator of image URLs/paths to the image loading helper.","solutions":["Pass a single image URL/path or a list of them.","Convert other iterables to a list before calling."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a597f974857b3d92939971296bc0deb93d33d780","analyzedAt":"2026-08-14T18:24:08.354Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}