agentscope-ai/agentscope · error · SkillUploadError
The upload contains no files.
Error message
The upload contains no files.
What it means
SkillUploadError (a ValueError) raised by WorkspaceService.validate_manifest when the upload manifest contains zero entries. validate_manifest is the gatekeeper run by upload_skill before any bytes are streamed, so an empty folder pick is rejected up front rather than creating an empty skill.
Source
Thrown at src/agentscope/app/_service/_workspace.py:368
@staticmethod
def validate_manifest(manifest: UploadManifest, file_count: int) -> str:
"""Check a manifest and return the skill's root directory name.
Args:
manifest (`UploadManifest`): The declared upload contents.
file_count (`int`): How many parts actually arrived.
Returns:
`str`: The single top-level directory every path sits under.
Raises:
SkillUploadError: If a limit is exceeded, a path is unsafe,
the paths span more than one root, no ``SKILL.md`` is
present, or the parts do not match the manifest.
"""
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.",View on GitHub (pinned to e90f1c7592)
Solutions
- Check the picked folder actually contains files before building the manifest.
- Ensure every file (especially SKILL.md) is included in entries — a filter that drops dotfiles or SKILL.md can leave entries empty.
- If the folder is legitimately empty, ask the user to select the skill's root folder that contains SKILL.md.
Example fix
# before
manifest = UploadManifest(entries=[])
await service.upload_skill(ws, manifest, stream)
# after
if not manifest.entries:
raise ValueError("Pick a folder containing at least SKILL.md")
await service.upload_skill(ws, manifest, stream) Defensive patterns
Strategy: validation
Validate before calling
if not manifest.entries:
raise ValueError("Select a folder with at least SKILL.md before uploading") Type guard
def has_entries(m: UploadManifest) -> bool:
return len(m.entries) > 0 Try / catch
try:
await service.upload_skill(ws, manifest, stream)
except SkillUploadError as e:
if "no files" in str(e):
# re-prompt user to pick a non-empty folder
... Prevention
- Build the manifest from a directory scan right before upload.
- Disable the upload button until entries is non-empty.
When it happens
Trigger: Calling upload_skill with a manifest whose entries list is empty — typically the browser folder picker returned no files, or the client built the manifest from an empty directory and sent it anyway.
Common situations: User picks an empty folder in the upload dialog; client-side code constructs UploadManifest(entries=[]) due to a filtering bug; folder contains only ignored/hidden files that the picker dropped.
Related errors
- A skill must be a single folder, got {sorted(roots)}.
- No SKILL.md at the root of {root!r}.
- The manifest lists {len(entries)} files but {file_count} wer
- A skill may hold at most {MAX_FILE_COUNT} files, got {len(en
- {entry.path!r} is {entry.size} bytes, over the {MAX_FILE_BYT
AI-assisted analysis of agentscope-ai/agentscope@e90f1c7592 (2026-08-28).
Data as JSON: /api/errors/86f7598b8718be62.
Report an issue: GitHub.