{"record":{"id":"c36c2cb8f774d6bf","repo":"agentscope-ai/agentscope","slug":"entry-path-r-is-entry-size-bytes-over-the-ma","errorCode":null,"errorMessage":"{entry.path!r} is {entry.size} bytes, over the {MAX_FILE_BYTES}-byte per-file limit.","messagePattern":"(.+?) is (.+?) bytes, over the (.+?)-byte per-file limit\\.","errorType":"exception","errorClass":"SkillUploadError","httpStatus":null,"severity":"error","filePath":"src/agentscope/app/_service/_workspace.py","lineNumber":384,"sourceCode":"        entries = manifest.entries\n        if not entries:\n            raise SkillUploadError(\"The upload contains no files.\")\n        if file_count != len(entries):\n            raise SkillUploadError(\n                f\"The manifest lists {len(entries)} files but \"\n                f\"{file_count} were sent.\",\n            )\n        if len(entries) > MAX_FILE_COUNT:\n            raise SkillUploadError(\n                f\"A skill may hold at most {MAX_FILE_COUNT} files, \"\n                f\"got {len(entries)}.\",\n            )\n\n        total = 0\n        roots: set[str] = set()\n        for entry in entries:\n            if entry.size > MAX_FILE_BYTES:\n                raise SkillUploadError(\n                    f\"{entry.path!r} is {entry.size} bytes, over the \"\n                    f\"{MAX_FILE_BYTES}-byte per-file limit.\",\n                )\n            total += entry.size\n\n            parts = entry.path.replace(\"\\\\\", \"/\").split(\"/\")\n            if len(parts) < 2 or any(p in (\"\", \".\", \"..\") for p in parts):\n                raise SkillUploadError(f\"Unsafe upload path: {entry.path!r}\")\n            if entry.path.startswith(\"/\"):\n                raise SkillUploadError(f\"Unsafe upload path: {entry.path!r}\")\n            roots.add(parts[0])\n\n        if total > MAX_TOTAL_BYTES:\n            raise SkillUploadError(\n                f\"The upload is {total} bytes, over the \"\n                f\"{MAX_TOTAL_BYTES}-byte limit.\",\n            )\n        if len(roots) != 1:","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/agentscope-ai/agentscope/blob/e90f1c7592896cc95f6e5ee506194f533378247d/src/agentscope/app/_service/_workspace.py#L366-L402","documentation":"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.","triggerScenarios":"Uploading a skill containing any single file larger than 50 MiB — bundled binaries, datasets, model weights, videos, or large archives.","commonSituations":"Vendoring a binary dependency or shipping training data inside the skill folder; compressed archives that hide the true size until enumerated.","solutions":["Find oversized files (size > 50 MiB) in the folder and remove or externalize them (host on CDN/object storage and link from SKILL.md).","Compress or downsample the asset if it must ship.","Split oversized data into multiple smaller files only if the format allows it."],"exampleFix":"# before\nentries = [UploadEntry(path=p, size=s) for p, s in files]\n\n# after\nMAX = 50 * 1024 * 1024\nbig = [p for p, s in files if s > MAX]\nif big:\n    raise ValueError(f\"Remove oversized files first: {big}\")\nentries = [UploadEntry(path=p, size=s) for p, s in files]","handlingStrategy":"validation","validationCode":"MAX = 50 * 1024 * 1024\noversized = [e.path for e in manifest.entries if e.size > MAX]\nif oversized:\n    raise ValueError(f\"Oversized files: {oversized}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Scan for large binaries before packaging a skill.","Host big assets externally and link them from SKILL.md."],"tags":["upload","limit","file-size","skill"],"backgroundTag":"upload-limit-exceeded","analyzedSha":"e90f1c7592896cc95f6e5ee506194f533378247d","analyzedAt":"2026-08-28T18:24:12.087Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}