{"record":{"id":"735e3b0c951418fa","repo":"deepset-ai/haystack","slug":"file-path-in-skill-name-is-not-a-readable","errorCode":null,"errorMessage":"File '{path}' in skill '{name}' is not a readable asset. Only UTF-8 text, images, and PDFs are supported.","messagePattern":"File '(.+?)' in skill '(.+?)' is not a readable asset\\. Only UTF-8 text, images, and PDFs are supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/skill_stores/file_system/skill_store.py","lineNumber":235,"sourceCode":"            )\n        if not target.is_file():\n            raise FileNotFoundError(\n                f\"File '{path}' not found in skill '{name}'. Readable files: {self._readable_files_hint(name)}.\"\n            )\n\n        # Check file types (PDF) before images: IMAGE_MIME_TYPES includes \"application/pdf\" (ImageContent can\n        # rasterize PDFs), but a skill's bundled PDF should reach the model as a FileContent, not an image.\n        mime_type, _ = mimetypes.guess_type(target.as_posix())\n        if mime_type in _SUPPORTED_FILE_MIME_TYPES:\n            encoded = base64.b64encode(target.read_bytes()).decode(\"utf-8\")\n            return FileContent(base64_data=encoded, mime_type=mime_type, filename=target.name, validation=False)\n        if mime_type in IMAGE_MIME_TYPES:\n            encoded = base64.b64encode(target.read_bytes()).decode(\"utf-8\")\n            return ImageContent(base64_image=encoded, mime_type=mime_type, validation=False)\n        try:\n            return target.read_text(encoding=\"utf-8\")\n        except UnicodeDecodeError as e:\n            raise ValueError(\n                f\"File '{path}' in skill '{name}' is not a readable asset. Only UTF-8 text, images, and PDFs \"\n                f\"are supported.\"\n            ) from e\n\n    def to_dict(self) -> dict[str, Any]:\n        \"\"\"\n        Serialize this store to a dictionary for use with `from_dict`.\n\n        :returns: Dictionary representation of the store.\n        \"\"\"\n        return default_to_dict(self, skills_dir=str(self.skills_dir))\n\n    @classmethod\n    def from_dict(cls, data: dict[str, Any]) -> \"FileSystemSkillStore\":\n        \"\"\"\n        Deserialize a `FileSystemSkillStore` from its dictionary representation.\n\n        :param data: Dictionary representation of the store, as produced by `to_dict`.","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/skill_stores/file_system/skill_store.py#L217-L253","documentation":"Error \"File '{path}' in skill '{name}' is not a readable asset. Only UTF-8 text, images, and PDFs are supported.\" thrown in deepset-ai/haystack.","triggerScenarios":"Thrown at haystack/skill_stores/file_system/skill_store.py:235 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":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}