{
  "id": "python/setuptools-long-description-error",
  "signature": "error: Multiple top-level packages discovered in a flat-layout: ['package1', 'package2'].",
  "signature_zh": "错误：在平面布局中发现多个顶级包：['package1', 'package2']。",
  "regex": "error:\\ Multiple\\ top\\-level\\ packages\\ discovered\\ in\\ a\\ flat\\-layout:\\ \\['package1',\\ 'package2'\\]\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "setuptools automatically discovers packages but finds multiple in the same directory, causing ambiguity.",
  "root_cause_type": "generic",
  "root_cause_zh": "setuptools 自动发现包，但在同一目录中找到多个，导致歧义。",
  "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": "Ignoring the warning and proceeding",
      "why_fails": "setuptools may fail to build or include wrong packages.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Renaming the packages to have a common prefix",
      "why_fails": "This does not resolve the flat-layout detection logic.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Explicitly specify packages in setup.py or setup.cfg",
      "success_rate": 0.9,
      "how": "In setup.cfg, add '[options]\\npackages = find:' and configure find options, or list packages manually.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a src-layout",
      "success_rate": 0.85,
      "how": "Move packages into a 'src/' directory and set 'package_dir = {\"\": \"src\"}' in setup.cfg.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-05-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}