{"record":{"id":"934d1c46877ce4af","repo":"run-llama/llama_index","slug":"playground-must-have-a-non-empty-list-of-indices","errorCode":null,"errorMessage":"Playground must have a non-empty list of indices.","messagePattern":"Playground must have a non-empty list of indices\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/playground/base.py","lineNumber":87,"sourceCode":"        Args:\n            documents: A List of Documents to experiment with.\n\n        \"\"\"\n        if len(documents) == 0:\n            raise ValueError(\n                \"Playground must be initialized with a nonempty list of Documents.\"\n            )\n\n        indices = [\n            index_class.from_documents(documents, **kwargs)\n            for index_class in index_classes\n        ]\n        return cls(indices, retriever_modes)\n\n    def _validate_indices(self, indices: List[BaseIndex]) -> None:\n        \"\"\"Validate a list of indices.\"\"\"\n        if len(indices) == 0:\n            raise ValueError(\"Playground must have a non-empty list of indices.\")\n        for index in indices:\n            if not isinstance(index, BaseIndex):\n                raise ValueError(\n                    \"Every index in Playground should be an instance of BaseIndex.\"\n                )\n\n    @property\n    def indices(self) -> List[BaseIndex]:\n        \"\"\"Get Playground's indices.\"\"\"\n        return self._indices\n\n    @indices.setter\n    def indices(self, indices: List[BaseIndex]) -> None:\n        \"\"\"Set Playground's indices.\"\"\"\n        self._validate_indices(indices)\n        self._indices = indices\n\n    def _validate_modes(self, retriever_modes: INDEX_SPECIFIC_QUERY_MODES_TYPE) -> None:","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/playground/base.py#L69-L105","documentation":"Error \"Playground must have a non-empty list of indices.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/playground/base.py:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one index to Playground, or let it build default indices from the documents.","Remove the empty indices list and allow indices to be built from documents."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}