{
  "id": "python/setuptools-manifest-in-missing-sdist-files",
  "signature": "FileNotFoundError: [Errno 2] No such file or directory: 'mypkg/data/config.yaml' during sdist install",
  "signature_zh": "FileNotFoundError：[Errno 2] 没有这样的文件或目录：sdist 安装期间 'mypkg/data/config.yaml'",
  "regex": "FileNotFoundError:\\ \\[Errno\\ 2\\]\\ No\\ such\\ file\\ or\\ directory:\\ 'mypkg/data/config\\.yaml'\\ during\\ sdist\\ install",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "MANIFEST.in did not include the data file in the sdist, so the installed package is missing it. The error surfaces at runtime when the code tries to open the file.",
  "root_cause_type": "generic",
  "root_cause_zh": "MANIFEST.in 未将数据文件包含在 sdist 中，因此安装的包缺少该文件。错误在运行时尝试打开文件时出现。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reinstalling the same incomplete sdist produces the same result.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Not reproducible; breaks on the next install.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "echo 'recursive-include mypkg/data *.yaml' >> MANIFEST.in",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.97,
      "how": "[tool.setuptools.package-data]\\nmypkg = [\"data/*.yaml\"]",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python -m build --sdist && tar -tzf dist/*.tar.gz | grep config.yaml",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}