zylon-ai/private-gpt · error · ValueError

path must use '/' separators only

Error message

path must use '/' separators only

What it means

Error "path must use '/' separators only" thrown in zylon-ai/private-gpt.

Source

Thrown at private_gpt/server/skills/skill_models.py:26

from private_gpt.components.storage.models import StoredFile


class SkillFileInput(BaseModel):
    path: str = Field(
        description="Relative path from skill root",
        min_length=1,
        max_length=512,
    )
    content_base64: str = Field(description="Base64 content", min_length=1)
    mime_type: str | None = Field(default=None, description="Optional mime type")

    @field_validator("path")
    @classmethod
    def validate_path(cls, value: str) -> str:
        if value.startswith("/"):
            raise ValueError("path must be relative and cannot contain '..'")
        if "\\" in value:
            raise ValueError("path must use '/' separators only")
        if ".." in value.split("/"):
            raise ValueError("path must be relative and cannot contain '..'")
        return value

    def to_payload(self) -> StoredFile:
        return StoredFile(
            path=self.path,
            content=base64.b64decode(self.content_base64),
            mime_type=self.mime_type,
        )


class CreateSkillBody(BaseModel):
    display_title: str = Field(
        description="Display title for the skill.",
        min_length=1,
        max_length=255,
    )

View on GitHub (pinned to 4a030776a3)

Solutions

  1. Use forward slashes ('/') as path separators, even on Windows.
  2. Replace any backslashes in the path with '/' before submitting the request.

When it happens

Trigger: Raised during skill file path validation when the path uses backslash separators instead of forward slashes.

Common situations: Creating a skill bundle on Windows where paths use '\'; normalize all paths to '/' separators before upload.


AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15). Data as JSON: /api/errors/165fda16381fcb8f. Report an issue: GitHub.