deepset-ai/haystack · error · ValueError

File '{path}' in skill '{name}' is not a readable asset. Onl

Error message

File '{path}' in skill '{name}' is not a readable asset. Only UTF-8 text, images, and PDFs are supported.

What it means

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.

Source

Thrown at haystack/skill_stores/file_system/skill_store.py:235

            )
        if not target.is_file():
            raise FileNotFoundError(
                f"File '{path}' not found in skill '{name}'. Readable files: {self._readable_files_hint(name)}."
            )

        # Check file types (PDF) before images: IMAGE_MIME_TYPES includes "application/pdf" (ImageContent can
        # rasterize PDFs), but a skill's bundled PDF should reach the model as a FileContent, not an image.
        mime_type, _ = mimetypes.guess_type(target.as_posix())
        if mime_type in _SUPPORTED_FILE_MIME_TYPES:
            encoded = base64.b64encode(target.read_bytes()).decode("utf-8")
            return FileContent(base64_data=encoded, mime_type=mime_type, filename=target.name, validation=False)
        if mime_type in IMAGE_MIME_TYPES:
            encoded = base64.b64encode(target.read_bytes()).decode("utf-8")
            return ImageContent(base64_image=encoded, mime_type=mime_type, validation=False)
        try:
            return target.read_text(encoding="utf-8")
        except UnicodeDecodeError as e:
            raise ValueError(
                f"File '{path}' in skill '{name}' is not a readable asset. Only UTF-8 text, images, and PDFs "
                f"are supported."
            ) from e

    def to_dict(self) -> dict[str, Any]:
        """
        Serialize this store to a dictionary for use with `from_dict`.

        :returns: Dictionary representation of the store.
        """
        return default_to_dict(self, skills_dir=str(self.skills_dir))

    @classmethod
    def from_dict(cls, data: dict[str, Any]) -> "FileSystemSkillStore":
        """
        Deserialize a `FileSystemSkillStore` from its dictionary representation.

        :param data: Dictionary representation of the store, as produced by `to_dict`.

View on GitHub (pinned to e318778c9b)

When it happens

Trigger: Thrown at haystack/skill_stores/file_system/skill_store.py:235 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30). Data as JSON: /api/errors/735e3b0c951418fa. Report an issue: GitHub.