agentscope-ai/agentscope · error · SkillUploadError

{entry.path!r} is {entry.size} bytes, over the {MAX_FILE_BYT

Error message

{entry.path!r} is {entry.size} bytes, over the {MAX_FILE_BYTES}-byte per-file limit.

What it means

SkillUploadError raised while iterating manifest entries when entry.size exceeds MAX_FILE_BYTES (50 MiB per file). Each declared file must individually fit under the per-file ceiling before anything is streamed.

Source

Thrown at src/agentscope/app/_service/_workspace.py:384

        entries = manifest.entries
        if not entries:
            raise SkillUploadError("The upload contains no files.")
        if file_count != len(entries):
            raise SkillUploadError(
                f"The manifest lists {len(entries)} files but "
                f"{file_count} were sent.",
            )
        if len(entries) > MAX_FILE_COUNT:
            raise SkillUploadError(
                f"A skill may hold at most {MAX_FILE_COUNT} files, "
                f"got {len(entries)}.",
            )

        total = 0
        roots: set[str] = set()
        for entry in entries:
            if entry.size > MAX_FILE_BYTES:
                raise SkillUploadError(
                    f"{entry.path!r} is {entry.size} bytes, over the "
                    f"{MAX_FILE_BYTES}-byte per-file limit.",
                )
            total += entry.size

            parts = entry.path.replace("\\", "/").split("/")
            if len(parts) < 2 or any(p in ("", ".", "..") for p in parts):
                raise SkillUploadError(f"Unsafe upload path: {entry.path!r}")
            if entry.path.startswith("/"):
                raise SkillUploadError(f"Unsafe upload path: {entry.path!r}")
            roots.add(parts[0])

        if total > MAX_TOTAL_BYTES:
            raise SkillUploadError(
                f"The upload is {total} bytes, over the "
                f"{MAX_TOTAL_BYTES}-byte limit.",
            )
        if len(roots) != 1:

View on GitHub (pinned to e90f1c7592)

Solutions

  1. Find oversized files (size > 50 MiB) in the folder and remove or externalize them (host on CDN/object storage and link from SKILL.md).
  2. Compress or downsample the asset if it must ship.
  3. Split oversized data into multiple smaller files only if the format allows it.

Example fix

# before
entries = [UploadEntry(path=p, size=s) for p, s in files]

# after
MAX = 50 * 1024 * 1024
big = [p for p, s in files if s > MAX]
if big:
    raise ValueError(f"Remove oversized files first: {big}")
entries = [UploadEntry(path=p, size=s) for p, s in files]
Defensive patterns

Strategy: validation

Validate before calling

MAX = 50 * 1024 * 1024
oversized = [e.path for e in manifest.entries if e.size > MAX]
if oversized:
    raise ValueError(f"Oversized files: {oversized}")

Prevention

When it happens

Trigger: Uploading a skill containing any single file larger than 50 MiB — bundled binaries, datasets, model weights, videos, or large archives.

Common situations: Vendoring a binary dependency or shipping training data inside the skill folder; compressed archives that hide the true size until enumerated.

Related errors


AI-assisted analysis of agentscope-ai/agentscope@e90f1c7592 (2026-08-28). Data as JSON: /api/errors/c36c2cb8f774d6bf. Report an issue: GitHub.