{"record":{"id":"baaa35e18d132b67","repo":"github/spec-kit","slug":"downloaded-content-for-bundle-entry-id-from","errorCode":null,"errorMessage":"Downloaded content for bundle '{entry_id}' from {_source_desc} is not valid YAML: {exc}","messagePattern":"Downloaded content for bundle '(.+?)' from (.+?) is not valid YAML: (.+?)","errorType":"exception","errorClass":"BundlerError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/commands/bundle/__init__.py","lineNumber":1046,"sourceCode":"                        f\"{_source_desc} is not a valid bundle: {exc}\"\n                    ) from exc\n                # _local_manifest_source returns None only when the file does\n                # not exist; since we just wrote *artifact* that cannot happen\n                # here.  The explicit guard ensures callers never receive None\n                # and silently degrade instead of raising a clear error.\n                if manifest is None:\n                    raise BundlerError(\n                        f\"Downloaded artifact for bundle '{entry_id}' from \"\n                        f\"{_source_desc} is not a valid bundle.\"\n                    )\n                return manifest\n\n        data = _yaml.safe_load(io.BytesIO(raw))\n        return BundleManifest.from_dict(data)\n    except BundlerError:\n        raise\n    except _yaml.YAMLError as exc:\n        raise BundlerError(\n            f\"Downloaded content for bundle '{entry_id}' from {_source_desc} \"\n            f\"is not valid YAML: {exc}\"\n        ) from exc\n    except Exception as exc:  # noqa: BLE001\n        raise BundlerError(\n            f\"Failed to parse downloaded bundle '{entry_id}' from \"\n            f\"{_source_desc}: {exc}\"\n        ) from exc\n\n\ndef _validate_manifest_structure(manifest, *, source: str) -> None:\n    \"\"\"Reject a malformed manifest before any project mutation can occur.\"\"\"\n    from ...bundler.services.validator import validate_manifest\n\n    report = validate_manifest(manifest)\n    if report.ok:\n        return\n    raise BundlerError(","sourceCodeStart":1028,"sourceCodeEnd":1064,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/commands/bundle/__init__.py#L1028-L1064","documentation":"The downloaded payload was not recognized as a ZIP, so Spec Kit treated it as a bundle.yml document and PyYAML rejected its syntax. The original parser error is included and chained, and the source description identifies the catalog or resolved URL that supplied the bytes.","triggerScenarios":"`specify bundle info/install/update` downloads a non-ZIP artifact whose YAML is invalid — bad indentation, an unsupported construct, or a truncated response that still parses as text but is not valid YAML.","commonSituations":"A hand-written bundle.yml has inconsistent indentation, the server returns a partially rendered template or error text without a .zip URL, or an edit removed a quote/colon.","solutions":["Open the exact URL from the message and copy its text into a YAML validator or editor with YAML syntax checking.","Fix the reported parser position, usually indentation, quoting, or a stray tab.","Confirm the server is sending the intended raw bundle.yml rather than HTML or a truncated response.","Re-upload the corrected YAML and retry the bundle command."],"exampleFix":"# bundle.yml (before)\nbundle:\n  id: demo\n version: 1.0.0\n\n# bundle.yml (after)\nbundle:\n  id: demo\n  version: 1.0.0","handlingStrategy":"validation","validationCode":"from pathlib import Path\nimport yaml\n\ndef manifest_yaml_parses(path: Path) -> bool:\n    try:\n        yaml.safe_load(path.read_text(encoding=\"utf-8\"))\n        return True\n    except yaml.YAMLError:\n        return False","typeGuard":null,"tryCatchPattern":"except BundlerError as exc:\n    if \"is not valid YAML\" in str(exc):\n        fetch_and_validate_yaml(url)\n    else:\n        raise","preventionTips":["Lint bundle.yml with a YAML parser in CI.","Use an editor with YAML language support and avoid tabs for indentation.","Confirm servers send raw YAML with the correct Content-Type and no HTML wrapper."],"tags":["yaml","bundle","manifest","download","validation"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}